home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| ASCII text, with CR line terminators
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[CR]
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [R*ch] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 52 65 63 65 69 76 65 64 | 2d 44 61 74 65 3a 20 46 |Received|-Date: F|
|00000010| 72 69 2c 20 31 32 20 41 | 75 67 20 31 39 39 34 20 |ri, 12 A|ug 1994 |
|00000020| 31 36 3a 30 34 3a 31 38 | 20 2b 30 32 30 30 0d 46 |16:04:18| +0200.F|
|00000030| 72 6f 6d 3a 20 70 6f 74 | 74 69 65 72 40 63 6c 69 |rom: pot|tier@cli|
|00000040| 70 70 65 72 2e 65 6e 73 | 2e 66 72 20 28 46 72 61 |pper.ens|.fr (Fra|
|00000050| 6e 63 6f 69 73 20 50 6f | 74 74 69 65 72 29 0d 53 |ncois Po|ttier).S|
|00000060| 75 62 6a 65 63 74 3a 20 | 63 73 6d 70 2d 64 69 67 |ubject: |csmp-dig|
|00000070| 65 73 74 2d 76 33 2d 30 | 35 31 0d 54 6f 3a 20 63 |est-v3-0|51.To: c|
|00000080| 73 6d 70 2d 64 69 67 65 | 73 74 40 65 6e 73 2e 66 |smp-dige|st@ens.f|
|00000090| 72 0d 44 61 74 65 3a 20 | 46 72 69 2c 20 31 32 20 |r.Date: |Fri, 12 |
|000000a0| 41 75 67 20 31 39 39 34 | 20 31 36 3a 30 34 3a 31 |Aug 1994| 16:04:1|
|000000b0| 34 20 2b 30 32 30 30 20 | 28 4d 45 54 20 44 53 54 |4 +0200 |(MET DST|
|000000c0| 29 0d 58 2d 4d 61 69 6c | 65 72 3a 20 45 4c 4d 20 |).X-Mail|er: ELM |
|000000d0| 5b 76 65 72 73 69 6f 6e | 20 32 2e 34 20 50 4c 32 |[version| 2.4 PL2|
|000000e0| 33 5d 0d 4d 69 6d 65 2d | 56 65 72 73 69 6f 6e 3a |3].Mime-|Version:|
|000000f0| 20 31 2e 30 0d 43 6f 6e | 74 65 6e 74 2d 54 79 70 | 1.0.Con|tent-Typ|
|00000100| 65 3a 20 74 65 78 74 2f | 70 6c 61 69 6e 3b 20 63 |e: text/|plain; c|
|00000110| 68 61 72 73 65 74 3d 49 | 53 4f 2d 38 38 35 39 2d |harset=I|SO-8859-|
|00000120| 31 0d 43 6f 6e 74 65 6e | 74 2d 54 72 61 6e 73 66 |1.Conten|t-Transf|
|00000130| 65 72 2d 45 6e 63 6f 64 | 69 6e 67 3a 20 38 62 69 |er-Encod|ing: 8bi|
|00000140| 74 0d 45 72 72 6f 72 73 | 2d 54 6f 3a 20 6c 69 73 |t.Errors|-To: lis|
|00000150| 74 6d 61 6e 40 65 6e 73 | 2e 66 72 0d 52 65 70 6c |tman@ens|.fr.Repl|
|00000160| 79 2d 54 6f 3a 20 70 6f | 74 74 69 65 72 40 63 6c |y-To: po|ttier@cl|
|00000170| 69 70 70 65 72 2e 65 6e | 73 2e 66 72 0d 58 2d 53 |ipper.en|s.fr.X-S|
|00000180| 65 71 75 65 6e 63 65 3a | 20 35 36 0d 0d 43 2e 53 |equence:| 56..C.S|
|00000190| 2e 4d 2e 50 2e 20 44 69 | 67 65 73 74 20 20 20 20 |.M.P. Di|gest |
|000001a0| 20 20 20 20 20 20 20 20 | 20 46 72 69 2c 20 31 32 | | Fri, 12|
|000001b0| 20 41 75 67 20 39 34 20 | 20 20 20 20 20 20 56 6f | Aug 94 | Vo|
|000001c0| 6c 75 6d 65 20 33 20 3a | 20 49 73 73 75 65 20 35 |lume 3 :| Issue 5|
|000001d0| 31 0d 20 0d 54 6f 64 61 | 79 27 73 20 54 6f 70 69 |1. .Toda|y's Topi|
|000001e0| 63 73 3a 0d 20 0d 20 20 | 20 20 20 20 20 20 43 6f |cs:. . | Co|
|000001f0| 6e 74 72 6f 6c 73 2c 20 | 46 6f 6e 74 73 2c 20 44 |ntrols, |Fonts, D|
|00000200| 69 61 6c 6f 67 73 20 26 | 20 52 65 73 45 64 69 74 |ialogs &| ResEdit|
|00000210| 20 28 6c 6f 6e 67 29 0d | 20 20 20 20 20 20 20 20 | (long).| |
|00000220| 44 65 6c 65 74 69 6e 67 | 20 70 74 72 20 74 6f 20 |Deleting| ptr to |
|00000230| 62 61 73 65 20 6e 6f 74 | 20 63 61 6c 6c 69 6e 67 |base not| calling|
|00000240| 20 64 74 6f 72 73 20 6f | 66 20 64 65 72 69 76 65 | dtors o|f derive|
|00000250| 64 0d 20 20 20 20 20 20 | 20 20 49 63 6f 6e 20 70 |d. | Icon p|
|00000260| 6f 73 69 74 69 6f 6e 73 | 20 6f 6e 20 64 65 73 6b |ositions| on desk|
|00000270| 74 6f 70 0d 20 20 20 20 | 20 20 20 20 4c 6f 6f 6b |top. | Look|
|00000280| 69 6e 67 20 66 6f 72 20 | 73 6f 75 72 63 65 20 63 |ing for |source c|
|00000290| 6f 64 65 0d 20 20 20 20 | 20 20 20 20 4e 65 65 64 |ode. | Need|
|000002a0| 20 43 20 73 6f 75 72 63 | 65 20 63 6f 64 65 20 66 | C sourc|e code f|
|000002b0| 6f 72 20 72 65 63 6f 72 | 64 69 6e 67 20 73 6f 75 |or recor|ding sou|
|000002c0| 6e 64 0d 20 20 20 20 20 | 20 20 20 4f 70 65 6e 50 |nd. | OpenP|
|000002d0| 69 63 74 75 72 65 20 77 | 69 74 68 20 74 65 6d 70 |icture w|ith temp|
|000002e0| 6f 72 61 72 79 20 6d 65 | 6d 6f 72 79 3f 0d 20 20 |orary me|mory?. |
|000002f0| 20 20 20 20 20 20 51 75 | 69 63 6b 54 69 6d 65 20 | Qu|ickTime |
|00000300| 32 2e 30 20 61 6e 64 20 | 4d 49 44 49 0d 20 20 20 |2.0 and |MIDI. |
|00000310| 20 20 20 20 20 54 61 62 | 20 50 61 74 63 68 20 66 | Tab| Patch f|
|00000320| 6f 72 20 54 65 78 74 45 | 64 69 74 0d 20 20 20 20 |or TextE|dit. |
|00000330| 20 20 20 20 5b 51 5d 20 | 49 6e 63 72 65 61 73 69 | [Q] |Increasi|
|00000340| 6e 67 20 73 74 61 63 6b | 20 73 69 7a 65 3f 0d 0d |ng stack| size?..|
|00000350| 0d 0d 54 68 65 20 43 6f | 6d 70 2e 53 79 73 2e 4d |..The Co|mp.Sys.M|
|00000360| 61 63 2e 50 72 6f 67 72 | 61 6d 6d 65 72 20 44 69 |ac.Progr|ammer Di|
|00000370| 67 65 73 74 20 69 73 20 | 6d 6f 64 65 72 61 74 65 |gest is |moderate|
|00000380| 64 20 62 79 20 46 72 61 | 6e 63 6f 69 73 20 50 6f |d by Fra|ncois Po|
|00000390| 74 74 69 65 72 0d 28 70 | 6f 74 74 69 65 72 40 63 |ttier.(p|ottier@c|
|000003a0| 6c 69 70 70 65 72 2e 65 | 6e 73 2e 66 72 29 2e 0d |lipper.e|ns.fr)..|
|000003b0| 20 0d 54 68 65 20 64 69 | 67 65 73 74 20 69 73 20 | .The di|gest is |
|000003c0| 61 20 63 6f 6c 6c 65 63 | 74 69 6f 6e 20 6f 66 20 |a collec|tion of |
|000003d0| 61 72 74 69 63 6c 65 20 | 74 68 72 65 61 64 73 20 |article |threads |
|000003e0| 66 72 6f 6d 20 74 68 65 | 20 69 6e 74 65 72 6e 65 |from the| interne|
|000003f0| 74 20 6e 65 77 73 67 72 | 6f 75 70 0d 63 6f 6d 70 |t newsgr|oup.comp|
|00000400| 2e 73 79 73 2e 6d 61 63 | 2e 70 72 6f 67 72 61 6d |.sys.mac|.program|
|00000410| 6d 65 72 2e 20 20 49 74 | 20 69 73 20 64 65 73 69 |mer. It| is desi|
|00000420| 67 6e 65 64 20 66 6f 72 | 20 70 65 6f 70 6c 65 20 |gned for| people |
|00000430| 77 68 6f 20 72 65 61 64 | 20 63 2e 73 2e 6d 2e 70 |who read| c.s.m.p|
|00000440| 2e 20 73 65 6d 69 2d 0d | 72 65 67 75 6c 61 72 6c |. semi-.|regularl|
|00000450| 79 20 61 6e 64 20 77 61 | 6e 74 20 61 6e 20 61 72 |y and wa|nt an ar|
|00000460| 63 68 69 76 65 20 6f 66 | 20 74 68 65 20 64 69 73 |chive of| the dis|
|00000470| 63 75 73 73 69 6f 6e 73 | 2e 20 20 49 66 20 79 6f |cussions|. If yo|
|00000480| 75 20 64 6f 6e 27 74 20 | 6b 6e 6f 77 20 77 68 61 |u don't |know wha|
|00000490| 74 20 61 0d 6e 65 77 73 | 67 72 6f 75 70 20 69 73 |t a.news|group is|
|000004a0| 2c 20 79 6f 75 20 70 72 | 6f 62 61 62 6c 79 20 64 |, you pr|obably d|
|000004b0| 6f 6e 27 74 20 68 61 76 | 65 20 61 63 63 65 73 73 |on't hav|e access|
|000004c0| 20 74 6f 20 69 74 2e 20 | 20 41 73 6b 20 79 6f 75 | to it. | Ask you|
|000004d0| 72 20 73 79 73 74 65 6d | 73 0d 61 64 6d 69 6e 69 |r system|s.admini|
|000004e0| 73 74 72 61 74 6f 72 28 | 73 29 20 66 6f 72 20 64 |strator(|s) for d|
|000004f0| 65 74 61 69 6c 73 2e 20 | 20 49 66 20 79 6f 75 20 |etails. | If you |
|00000500| 64 6f 6e 27 74 20 68 61 | 76 65 20 61 63 63 65 73 |don't ha|ve acces|
|00000510| 73 20 74 6f 20 6e 65 77 | 73 2c 20 79 6f 75 20 6d |s to new|s, you m|
|00000520| 61 79 0d 73 74 69 6c 6c | 20 62 65 20 61 62 6c 65 |ay.still| be able|
|00000530| 20 74 6f 20 70 6f 73 74 | 20 6d 65 73 73 61 67 65 | to post| message|
|00000540| 73 20 74 6f 20 74 68 65 | 20 67 72 6f 75 70 20 62 |s to the| group b|
|00000550| 79 20 75 73 69 6e 67 20 | 61 20 6d 61 69 6c 20 73 |y using |a mail s|
|00000560| 65 72 76 65 72 20 6c 69 | 6b 65 0d 61 6e 6f 6e 2e |erver li|ke.anon.|
|00000570| 70 65 6e 65 74 2e 66 69 | 20 28 6d 61 69 6c 20 68 |penet.fi| (mail h|
|00000580| 65 6c 70 40 61 6e 6f 6e | 2e 70 65 6e 65 74 2e 66 |elp@anon|.penet.f|
|00000590| 69 20 66 6f 72 20 6d 6f | 72 65 20 69 6e 66 6f 72 |i for mo|re infor|
|000005a0| 6d 61 74 69 6f 6e 29 2e | 0d 20 0d 45 61 63 68 20 |mation).|. .Each |
|000005b0| 69 73 73 75 65 20 6f 66 | 20 74 68 65 20 64 69 67 |issue of| the dig|
|000005c0| 65 73 74 20 63 6f 6e 74 | 61 69 6e 73 20 6f 6e 65 |est cont|ains one|
|000005d0| 20 6f 72 20 6d 6f 72 65 | 20 73 65 74 73 20 6f 66 | or more| sets of|
|000005e0| 20 61 72 74 69 63 6c 65 | 73 20 28 63 61 6c 6c 65 | article|s (calle|
|000005f0| 64 0d 74 68 72 65 61 64 | 73 29 2c 20 77 69 74 68 |d.thread|s), with|
|00000600| 20 65 61 63 68 20 73 65 | 74 20 63 6f 72 72 65 73 | each se|t corres|
|00000610| 70 6f 6e 64 69 6e 67 20 | 74 6f 20 61 20 27 64 69 |ponding |to a 'di|
|00000620| 73 63 75 73 73 69 6f 6e | 27 20 6f 66 20 61 20 70 |scussion|' of a p|
|00000630| 61 72 74 69 63 75 6c 61 | 72 0d 73 75 62 6a 65 63 |articula|r.subjec|
|00000640| 74 2e 20 20 54 68 65 20 | 61 72 74 69 63 6c 65 73 |t. The |articles|
|00000650| 20 61 72 65 20 6e 6f 74 | 20 65 64 69 74 65 64 3b | are not| edited;|
|00000660| 20 61 6c 6c 20 61 72 74 | 69 63 6c 65 73 20 69 6e | all art|icles in|
|00000670| 63 6c 75 64 65 64 20 69 | 6e 20 74 68 69 73 20 64 |cluded i|n this d|
|00000680| 69 67 65 73 74 0d 61 72 | 65 20 69 6e 20 74 68 65 |igest.ar|e in the|
|00000690| 69 72 20 6f 72 69 67 69 | 6e 61 6c 20 70 6f 73 74 |ir origi|nal post|
|000006a0| 65 64 20 66 6f 72 6d 20 | 28 61 73 20 72 65 63 65 |ed form |(as rece|
|000006b0| 69 76 65 64 20 62 79 20 | 6f 75 72 20 6e 65 77 73 |ived by |our news|
|000006c0| 20 73 65 72 76 65 72 20 | 61 74 0d 6e 65 66 2e 65 | server |at.nef.e|
|000006d0| 6e 73 2e 66 72 29 2e 20 | 20 41 72 74 69 63 6c 65 |ns.fr). | Article|
|000006e0| 20 74 68 72 65 61 64 73 | 20 61 72 65 20 6e 6f 74 | threads| are not|
|000006f0| 20 61 64 64 65 64 20 74 | 6f 20 74 68 65 20 64 69 | added t|o the di|
|00000700| 67 65 73 74 20 75 6e 74 | 69 6c 20 74 68 65 20 6c |gest unt|il the l|
|00000710| 61 73 74 0d 61 72 74 69 | 63 6c 65 20 61 64 64 65 |ast.arti|cle adde|
|00000720| 64 20 74 6f 20 74 68 65 | 20 74 68 72 65 61 64 20 |d to the| thread |
|00000730| 69 73 20 61 74 20 6c 65 | 61 73 74 20 74 77 6f 20 |is at le|ast two |
|00000740| 77 65 65 6b 73 20 6f 6c | 64 20 28 74 68 69 73 20 |weeks ol|d (this |
|00000750| 69 73 20 74 6f 20 65 6e | 73 75 72 65 20 74 68 61 |is to en|sure tha|
|00000760| 74 0d 74 68 65 20 74 68 | 72 65 61 64 20 69 73 20 |t.the th|read is |
|00000770| 64 65 61 64 20 62 65 66 | 6f 72 65 20 61 64 64 69 |dead bef|ore addi|
|00000780| 6e 67 20 69 74 20 74 6f | 20 74 68 65 20 64 69 67 |ng it to| the dig|
|00000790| 65 73 74 29 2e 20 20 41 | 72 74 69 63 6c 65 20 74 |est). A|rticle t|
|000007a0| 68 72 65 61 64 73 20 74 | 68 61 74 0d 63 6f 6e 73 |hreads t|hat.cons|
|000007b0| 69 73 74 20 6f 66 20 6f | 6e 6c 79 20 6f 6e 65 20 |ist of o|nly one |
|000007c0| 6d 65 73 73 61 67 65 20 | 61 72 65 20 67 65 6e 65 |message |are gene|
|000007d0| 72 61 6c 6c 79 20 6e 6f | 74 20 69 6e 63 6c 75 64 |rally no|t includ|
|000007e0| 65 64 20 69 6e 20 74 68 | 65 20 64 69 67 65 73 74 |ed in th|e digest|
|000007f0| 2e 0d 0d 54 68 65 20 64 | 69 67 65 73 74 20 69 73 |...The d|igest is|
|00000800| 20 6f 66 66 69 63 69 61 | 6c 6c 79 20 64 69 73 74 | officia|lly dist|
|00000810| 72 69 62 75 74 65 64 20 | 62 79 20 74 77 6f 20 6d |ributed |by two m|
|00000820| 65 61 6e 73 2c 20 62 79 | 20 65 6d 61 69 6c 20 61 |eans, by| email a|
|00000830| 6e 64 20 66 74 70 2e 0d | 0d 49 66 20 79 6f 75 20 |nd ftp..|.If you |
|00000840| 77 61 6e 74 20 74 6f 20 | 72 65 63 65 69 76 65 20 |want to |receive |
|00000850| 74 68 65 20 64 69 67 65 | 73 74 20 62 79 20 6d 61 |the dige|st by ma|
|00000860| 69 6c 2c 20 73 65 6e 64 | 20 65 6d 61 69 6c 20 74 |il, send| email t|
|00000870| 6f 20 6c 69 73 74 73 65 | 72 76 40 65 6e 73 2e 66 |o listse|rv@ens.f|
|00000880| 72 0d 77 69 74 68 20 6e | 6f 20 73 75 62 6a 65 63 |r.with n|o subjec|
|00000890| 74 20 61 6e 64 20 6f 6e | 65 20 6f 66 20 74 68 65 |t and on|e of the|
|000008a0| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 63 6f 6d 6d 61 | followi|ng comma|
|000008b0| 6e 64 73 20 61 73 20 62 | 6f 64 79 3a 0d 20 20 20 |nds as b|ody:. |
|000008c0| 20 68 65 6c 70 09 09 20 | 20 20 20 20 20 20 20 20 | help.. | |
|000008d0| 20 20 20 20 20 20 20 53 | 65 6e 64 73 20 79 6f 75 | S|ends you|
|000008e0| 20 61 20 73 75 6d 6d 61 | 72 79 20 6f 66 20 63 6f | a summa|ry of co|
|000008f0| 6d 6d 61 6e 64 73 0d 20 | 20 20 20 73 75 62 73 63 |mmands. | subsc|
|00000900| 72 69 62 65 20 63 73 6d | 70 2d 64 69 67 65 73 74 |ribe csm|p-digest|
|00000910| 20 59 6f 75 72 20 4e 61 | 6d 65 09 41 64 64 73 20 | Your Na|me.Adds |
|00000920| 79 6f 75 20 74 6f 20 74 | 68 65 20 6d 61 69 6c 69 |you to t|he maili|
|00000930| 6e 67 20 6c 69 73 74 0d | 20 20 20 20 73 69 67 6e |ng list.| sign|
|00000940| 6f 66 66 20 63 73 6d 70 | 2d 64 69 67 65 73 74 09 |off csmp|-digest.|
|00000950| 09 09 52 65 6d 6f 76 65 | 73 20 79 6f 75 20 66 72 |..Remove|s you fr|
|00000960| 6f 6d 20 74 68 65 20 6c | 69 73 74 0d 4f 6e 63 65 |om the l|ist.Once|
|00000970| 20 79 6f 75 20 68 61 76 | 65 20 73 75 62 73 63 72 | you hav|e subscr|
|00000980| 69 62 65 64 2c 20 79 6f | 75 20 77 69 6c 6c 20 61 |ibed, yo|u will a|
|00000990| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 20 72 65 63 |utomatic|ally rec|
|000009a0| 65 69 76 65 20 65 61 63 | 68 20 6e 65 77 0d 69 73 |eive eac|h new.is|
|000009b0| 73 75 65 20 61 73 20 69 | 74 20 69 73 20 63 72 65 |sue as i|t is cre|
|000009c0| 61 74 65 64 2e 0d 0d 54 | 68 65 20 6f 66 66 69 63 |ated...T|he offic|
|000009d0| 69 61 6c 20 66 74 70 20 | 69 6e 66 6f 20 69 73 20 |ial ftp |info is |
|000009e0| 2f 2f 66 74 70 2e 64 61 | 72 74 6d 6f 75 74 68 2e |//ftp.da|rtmouth.|
|000009f0| 65 64 75 2f 70 75 62 2f | 63 73 6d 70 2d 64 69 67 |edu/pub/|csmp-dig|
|00000a00| 65 73 74 2e 0d 51 75 65 | 73 74 69 6f 6e 73 20 72 |est..Que|stions r|
|00000a10| 65 6c 61 74 65 64 20 74 | 6f 20 74 68 65 20 66 74 |elated t|o the ft|
|00000a20| 70 20 73 69 74 65 20 73 | 68 6f 75 6c 64 20 62 65 |p site s|hould be|
|00000a30| 20 64 69 72 65 63 74 65 | 64 20 74 6f 0d 73 63 6f | directe|d to.sco|
|00000a40| 74 74 2e 73 69 6c 76 65 | 72 40 64 61 72 74 6d 6f |tt.silve|r@dartmo|
|00000a50| 75 74 68 2e 65 64 75 2e | 20 43 75 72 72 65 6e 74 |uth.edu.| Current|
|00000a60| 6c 79 20 6e 6f 20 70 72 | 65 76 69 6f 75 73 20 76 |ly no pr|evious v|
|00000a70| 6f 6c 75 6d 65 73 20 6f | 66 20 74 68 65 20 43 53 |olumes o|f the CS|
|00000a80| 4d 50 0d 64 69 67 65 73 | 74 20 61 72 65 20 61 76 |MP.diges|t are av|
|00000a90| 61 69 6c 61 62 6c 65 20 | 74 68 65 72 65 2e 0d 0d |ailable |there...|
|00000aa0| 41 6c 73 6f 2c 20 74 68 | 65 20 64 69 67 65 73 74 |Also, th|e digest|
|00000ab0| 73 20 61 72 65 20 61 76 | 61 69 6c 61 62 6c 65 20 |s are av|ailable |
|00000ac0| 74 6f 20 57 41 49 53 20 | 75 73 65 72 73 2e 20 20 |to WAIS |users. |
|00000ad0| 54 6f 20 73 65 61 72 63 | 68 20 62 61 63 6b 20 69 |To searc|h back i|
|00000ae0| 73 73 75 65 73 0d 77 69 | 74 68 20 57 41 49 53 2c |ssues.wi|th WAIS,|
|00000af0| 20 75 73 65 20 63 6f 6d | 70 2e 73 79 73 2e 6d 61 | use com|p.sys.ma|
|00000b00| 63 2e 70 72 6f 67 72 61 | 6d 6d 65 72 2e 73 72 63 |c.progra|mmer.src|
|00000b10| 2e 20 57 69 74 68 20 4d | 6f 73 61 69 63 2c 20 75 |. With M|osaic, u|
|00000b20| 73 65 0d 68 74 74 70 3a | 2f 2f 77 77 77 2e 77 61 |se.http:|//www.wa|
|00000b30| 69 73 2e 63 6f 6d 2f 77 | 61 69 73 2d 64 62 73 2f |is.com/w|ais-dbs/|
|00000b40| 63 6f 6d 70 2e 73 79 73 | 2e 6d 61 63 2e 70 72 6f |comp.sys|.mac.pro|
|00000b50| 67 72 61 6d 6d 65 72 2e | 68 74 6d 6c 2e 0d 0d 0d |grammer.|html....|
|00000b60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b90| 2d 2d 2d 2d 2d 2d 2d 0d | 0d 3e 46 72 6f 6d 20 6a |-------.|.>From j|
|00000ba0| 63 72 40 6d 62 75 6e 69 | 78 2e 6d 69 74 72 65 2e |cr@mbuni|x.mitre.|
|00000bb0| 6f 72 67 20 28 52 6f 67 | 65 72 73 29 0d 53 75 62 |org (Rog|ers).Sub|
|00000bc0| 6a 65 63 74 3a 20 43 6f | 6e 74 72 6f 6c 73 2c 20 |ject: Co|ntrols, |
|00000bd0| 46 6f 6e 74 73 2c 20 44 | 69 61 6c 6f 67 73 20 26 |Fonts, D|ialogs &|
|00000be0| 20 52 65 73 45 64 69 74 | 20 28 6c 6f 6e 67 29 0d | ResEdit| (long).|
|00000bf0| 44 61 74 65 3a 20 32 38 | 20 4a 75 6c 20 31 39 39 |Date: 28| Jul 199|
|00000c00| 34 20 31 39 3a 33 31 3a | 32 33 20 47 4d 54 0d 4f |4 19:31:|23 GMT.O|
|00000c10| 72 67 61 6e 69 7a 61 74 | 69 6f 6e 3a 20 54 68 65 |rganizat|ion: The|
|00000c20| 20 4d 49 54 52 45 20 43 | 6f 72 70 6f 72 61 74 69 | MITRE C|orporati|
|00000c30| 6f 6e 2c 20 42 65 64 66 | 6f 72 64 2c 20 4d 41 0d |on, Bedf|ord, MA.|
|00000c40| 0d 54 68 65 72 65 27 73 | 20 62 65 65 6e 20 61 20 |.There's| been a |
|00000c50| 62 69 74 20 6f 66 20 74 | 72 61 66 66 69 63 20 6c |bit of t|raffic l|
|00000c60| 61 74 65 6c 79 20 61 6c | 6c 20 68 61 76 69 6e 67 |ately al|l having|
|00000c70| 20 74 6f 20 64 6f 20 77 | 69 74 68 20 66 6f 6e 74 | to do w|ith font|
|00000c80| 73 0d 6f 66 20 64 69 61 | 6c 6f 67 20 69 74 65 6d |s.of dia|log item|
|00000c90| 73 2c 20 61 6e 64 20 49 | 20 6a 75 73 74 20 68 61 |s, and I| just ha|
|00000ca0| 70 70 65 6e 20 74 6f 20 | 68 61 76 65 20 62 65 65 |ppen to |have bee|
|00000cb0| 6e 20 63 6f 6e 63 65 72 | 6e 65 64 20 77 69 74 68 |n concer|ned with|
|00000cc0| 20 74 68 61 74 0d 6d 79 | 73 65 6c 66 20 6c 61 74 | that.my|self lat|
|00000cd0| 65 6c 79 2c 20 61 6e 64 | 20 61 6c 73 6f 20 77 69 |ely, and| also wi|
|00000ce0| 74 68 20 63 6f 6e 74 72 | 6f 6c 73 2c 20 73 6f 20 |th contr|ols, so |
|00000cf0| 49 20 64 65 63 69 64 65 | 64 20 74 6f 20 74 72 79 |I decide|d to try|
|00000d00| 20 74 6f 20 70 75 74 0d | 74 6f 67 65 74 68 65 72 | to put.|together|
|00000d10| 20 61 20 63 6f 6e 63 69 | 73 65 20 67 75 69 64 65 | a conci|se guide|
|00000d20| 20 74 6f 20 74 68 65 73 | 65 20 6f 76 65 72 6c 61 | to thes|e overla|
|00000d30| 70 70 69 6e 67 20 74 6f | 70 69 63 73 2e 20 49 74 |pping to|pics. It|
|00000d40| 20 66 6f 6c 6c 6f 77 73 | 2e 0d 45 76 65 72 79 6f | follows|..Everyo|
|00000d50| 6e 65 20 66 65 65 6c 20 | 66 72 65 65 20 74 6f 20 |ne feel |free to |
|00000d60| 61 64 64 20 74 6f 20 69 | 74 2e 20 4f 72 20 73 65 |add to i|t. Or se|
|00000d70| 6e 64 20 63 6f 6d 6d 65 | 6e 74 73 20 74 6f 20 6d |nd comme|nts to m|
|00000d80| 65 20 61 6e 64 20 49 27 | 6c 6c 0d 69 6e 63 6f 72 |e and I'|ll.incor|
|00000d90| 70 6f 72 61 74 65 2e 0d | 0d 3d 3d 3d 3d 3d 3d 3d |porate..|.=======|
|00000da0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000db0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000dc0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000dd0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 0d 43 |========|======.C|
|00000de0| 72 65 61 74 69 6e 67 20 | 43 6f 6e 74 72 6f 6c 73 |reating |Controls|
|00000df0| 20 77 69 74 68 20 52 65 | 73 45 64 69 74 20 32 2e | with Re|sEdit 2.|
|00000e00| 31 2e 31 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |1.1 | |
|00000e10| 20 20 20 20 20 20 20 20 | 32 38 20 4a 75 6c 79 20 | |28 July |
|00000e20| 31 39 39 34 0d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |1994.===|========|
|00000e30| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000e40| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000e50| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000e60| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 0d 0d 48 65 72 65 |========|==..Here|
|00000e70| 20 69 73 20 61 20 67 75 | 69 64 65 20 74 6f 20 63 | is a gu|ide to c|
|00000e80| 72 65 61 74 69 6e 67 20 | 63 6f 6e 74 72 6f 6c 73 |reating |controls|
|00000e90| 20 75 73 69 6e 67 20 52 | 65 73 45 64 69 74 20 32 | using R|esEdit 2|
|00000ea0| 2e 31 2e 31 2e 0d 0d 50 | 6c 65 61 73 65 20 64 69 |.1.1...P|lease di|
|00000eb0| 73 74 72 69 62 75 74 65 | 20 66 72 65 65 6c 79 2c |stribute| freely,|
|00000ec0| 20 61 6e 64 20 61 64 64 | 20 74 6f 20 61 6e 79 20 | and add| to any |
|00000ed0| 61 70 70 72 6f 70 72 69 | 61 74 65 20 46 41 51 73 |appropri|ate FAQs|
|00000ee0| 2e 0d 0d 50 6c 65 61 73 | 65 20 73 65 6e 64 20 61 |...Pleas|e send a|
|00000ef0| 6e 79 20 63 6f 6d 6d 65 | 6e 74 73 20 72 65 67 61 |ny comme|nts rega|
|00000f00| 72 64 69 6e 67 20 65 72 | 72 6f 72 73 2c 20 6f 6d |rding er|rors, om|
|00000f10| 69 73 73 69 6f 6e 73 2c | 20 65 74 63 2e 2c 20 74 |issions,| etc., t|
|00000f20| 6f 3a 0d 0d 20 20 20 20 | 20 4a 65 66 66 20 52 6f |o:.. | Jeff Ro|
|00000f30| 67 65 72 73 0d 20 20 20 | 20 20 6a 72 6f 67 65 72 |gers. | jroger|
|00000f40| 73 40 6d 69 74 72 65 2e | 6f 72 67 0d 5f 5f 5f 5f |s@mitre.|org.____|
|00000f50| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000f60| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000f70| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000f80| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000f90| 5f 0d 0d 57 68 65 6e 20 | 65 64 69 74 69 6e 67 20 |_..When |editing |
|00000fa0| 61 20 63 6f 6e 74 72 6f | 6c 20 69 6e 20 52 65 73 |a contro|l in Res|
|00000fb0| 45 64 69 74 2c 20 79 6f | 75 20 73 65 65 20 61 20 |Edit, yo|u see a |
|00000fc0| 74 65 6d 70 6c 61 74 65 | 20 6d 75 63 68 20 6c 69 |template| much li|
|00000fd0| 6b 65 0d 74 68 65 20 41 | 53 43 49 49 20 64 65 70 |ke.the A|SCII dep|
|00000fe0| 69 63 74 69 6f 6e 20 62 | 65 6c 6f 77 2e 0d 0d 0d |iction b|elow....|
|00000ff0| 2b 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |+-------|--------|
|00001000| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001010| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001020| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001030| 2d 2d 2d 2d 2b 0d 7c 3d | 7c 5f 7c 3d 3d 3d 3d 3d |----+.|=||_|=====|
|00001040| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 20 43 4e 54 4c 20 49 |========|= CNTL I|
|00001050| 44 20 3d 20 31 32 38 20 | 66 72 6f 6d 20 41 70 70 |D = 128 |from App|
|00001060| 5f 70 69 2e 72 73 72 63 | 20 3d 3d 3d 3d 3d 3d 3d |_pi.rsrc| =======|
|00001070| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 7c 0d 7c 2d 2d 2d |========|==|.|---|
|00001080| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000010a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000010b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2b 2d |--------|------+-|
|000010c0| 7c 0d 7c 20 20 20 20 20 | 20 20 20 20 20 20 20 20 ||.| | |
|000010d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000010e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000010f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001100| 20 20 20 20 7c 5e 7c 0d | 7c 20 20 20 20 20 20 20 | |^|.|| |
|00001110| 20 20 20 20 20 20 20 20 | 2b 2d 2d 2d 2d 2d 2b 20 | |+-----+ |
|00001120| 2b 2d 2d 2d 2d 2d 2b 20 | 2b 2d 2d 2d 2d 2d 2b 20 |+-----+ |+-----+ |
|00001130| 2b 2d 2d 2d 2d 2d 2b 20 | 20 20 20 2c 2d 2d 2d 2d |+-----+ | ,----|
|00001140| 2d 2e 20 20 20 20 20 20 | 20 20 7c 20 7c 0d 7c 20 |-. | | |.| |
|00001150| 20 42 6f 75 6e 64 73 52 | 65 63 74 20 20 20 7c 20 | BoundsR|ect | |
|00001160| 33 39 31 20 7c 20 7c 20 | 35 30 32 20 7c 20 7c 20 |391 | | |502 | | |
|00001170| 34 31 31 20 7c 20 7c 20 | 36 35 32 20 7c 20 20 20 |411 | | |652 | |
|00001180| 28 20 20 53 65 74 20 20 | 29 20 20 20 20 20 20 20 |( Set |) |
|00001190| 7c 20 7c 0d 7c 20 20 20 | 20 20 20 20 20 20 20 20 || |.| | |
|000011a0| 20 20 20 20 2b 2d 2d 2d | 2d 2d 2b 20 2b 2d 2d 2d | +---|--+ +---|
|000011b0| 2d 2d 2b 20 2b 2d 2d 2d | 2d 2d 2b 20 2b 2d 2d 2d |--+ +---|--+ +---|
|000011c0| 2d 2d 2b 20 20 20 20 27 | 2d 2d 2d 2d 2d 27 20 20 |--+ '|-----' |
|000011d0| 20 20 20 20 20 20 7c 20 | 7c 0d 7c 20 20 20 20 20 | | ||.| |
|000011e0| 20 20 20 20 20 20 20 20 | 20 20 2b 2d 2d 2d 2d 2d | | +-----|
|000011f0| 2d 2d 2d 2d 2d 2d 2b 20 | 20 20 20 20 20 20 20 20 |------+ | |
|00001200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001210| 20 20 20 20 20 20 20 20 | 20 20 20 20 7c 20 7c 0d | | | |.|
|00001220| 7c 20 20 56 61 6c 75 65 | 20 20 20 20 20 20 20 20 || Value| |
|00001230| 7c 20 30 20 20 20 20 20 | 20 20 20 20 7c 20 20 20 || 0 | | |
|00001240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001250| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001260| 20 20 7c 20 7c 0d 7c 20 | 20 20 20 20 20 20 20 20 | | |.| | |
|00001270| 20 20 20 20 20 20 2b 2d | 2d 2d 2d 2d 2d 2d 2d 2d | +-|--------|
|00001280| 2d 2d 2b 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |--+ | |
|00001290| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000012a0| 20 20 20 20 20 20 20 20 | 7c 20 7c 0d 7c 20 20 20 | || |.| |
|000012b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2c 2d 2e | | ,-.|
|000012c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 2c 2d 2e 20 | | ,-. |
|000012d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000012e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7c 20 | | | |
|000012f0| 7c 0d 7c 20 20 56 69 73 | 69 62 6c 65 20 20 20 20 ||.| Vis|ible |
|00001300| 20 20 28 20 30 20 29 20 | 54 72 75 65 20 20 20 20 | ( 0 ) |True |
|00001310| 20 28 20 20 20 29 20 46 | 61 6c 73 65 20 20 20 20 | ( ) F|alse |
|00001320| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001330| 20 20 20 20 7c 20 7c 0d | 7c 20 20 20 20 20 20 20 | | |.|| |
|00001340| 20 20 20 20 20 20 20 20 | 20 27 2d 27 20 20 20 20 | | '-' |
|00001350| 20 20 20 20 20 20 20 20 | 27 2d 27 20 20 20 20 20 | |'-' |
|00001360| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001370| 20 20 20 20 20 20 20 20 | 20 20 7c 20 7c 0d 7c 20 | | | |.| |
|00001380| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2b 2d | | +-|
|00001390| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2b 20 20 20 20 20 |--------|--+ |
|000013a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000013b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000013c0| 7c 20 7c 0d 7c 20 20 4d | 61 78 20 20 20 20 20 20 || |.| M|ax |
|000013d0| 20 20 20 20 7c 20 31 20 | 20 20 20 20 20 20 20 20 | | 1 | |
|000013e0| 7c 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 || | |
|000013f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001400| 20 20 20 20 20 20 7c 20 | 7c 0d 7c 20 20 20 20 20 | | ||.| |
|00001410| 20 20 20 20 20 20 20 20 | 20 20 2b 2d 2d 2d 2d 2d | | +-----|
|00001420| 2d 2d 2d 2d 2d 2d 2b 20 | 20 20 20 20 20 20 20 20 |------+ | |
|00001430| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001440| 20 20 20 20 20 20 20 20 | 20 20 20 20 7c 20 7c 0d | | | |.|
|00001450| 7c 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 || | |
|00001460| 2b 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2b 20 20 20 |+-------|----+ |
|00001470| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001490| 20 20 7c 20 7c 0d 7c 20 | 20 4d 69 6e 20 20 20 20 | | |.| | Min |
|000014a0| 20 20 20 20 20 20 7c 20 | 30 20 20 20 20 20 20 20 | | |0 |
|000014b0| 20 20 7c 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |
|000014c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000014d0| 20 20 20 20 20 20 20 20 | 7c 20 7c 0d 7c 20 20 20 | || |.| |
|000014e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 2b 2d 2d 2d | | +---|
|000014f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2b 20 20 20 20 20 20 20 |--------|+ |
|00001500| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001510| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7c 20 | | | |
|00001520| 7c 0d 7c 20 20 20 20 20 | 20 20 20 20 20 20 20 20 ||.| | |
|00001530| 20 20 2b 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2b 20 | +-----|------+ |
|00001540| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001550| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001560| 20 20 20 20 7c 20 7c 0d | 7c 20 20 50 72 6f 63 49 | | |.|| ProcI|
|00001570| 44 20 20 20 20 20 20 20 | 7c 20 38 20 20 20 20 20 |D || 8 |
|00001580| 20 20 20 20 7c 20 20 20 | 20 20 20 20 20 20 20 20 | | | |
|00001590| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000015a0| 20 20 20 20 20 20 20 20 | 20 20 7c 20 7c 0d 7c 20 | | | |.| |
|000015b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2b 2d | | +-|
|000015c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2b 20 20 20 20 20 |--------|--+ |
|000015d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000015e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000015f0| 7c 20 7c 0d 7c 20 20 20 | 20 20 20 20 20 20 20 20 || |.| | |
|00001600| 20 20 20 20 2b 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | +---|--------|
|00001610| 2d 2d 2d 2d 2d 2b 20 20 | 20 20 20 20 20 20 20 20 |-----+ | |
|00001620| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001630| 20 20 20 20 20 20 7c 20 | 7c 0d 7c 20 20 52 65 66 | | ||.| Ref|
|00001640| 43 6f 6e 20 20 20 20 20 | 20 20 7c 20 30 20 20 20 |Con | | 0 |
|00001650| 20 20 20 20 20 20 20 20 | 20 20 20 7c 20 20 20 20 | | | |
|00001660| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001670| 20 20 20 20 20 20 20 20 | 20 20 20 20 7c 20 7c 0d | | | |.|
|00001680| 7c 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 || | |
|00001690| 2b 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |+-------|--------|
|000016a0| 2d 2b 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |-+ | |
|000016b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000016c0| 20 20 7c 20 7c 0d 7c 20 | 20 20 20 20 20 20 20 20 | | |.| | |
|000016d0| 20 20 20 20 20 20 2b 2d | 2d 2d 2d 2d 2d 2d 2d 2d | +-|--------|
|000016e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000016f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2b 20 20 20 20 |--------|---+ |
|00001700| 20 20 20 20 20 20 20 20 | 7c 20 7c 0d 7c 20 20 54 | || |.| T|
|00001710| 69 74 6c 65 20 20 20 20 | 20 20 20 20 7c 20 47 65 |itle | | Ge|
|00001720| 6e 65 72 61 74 65 20 53 | 63 68 65 64 75 6c 65 2e |nerate S|chedule.|
|00001730| 2e 2e 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00001740| 20 7c 20 20 20 20 20 20 | 20 20 20 20 20 20 7c 20 | | | | |
|00001750| 7c 0d 7c 20 20 20 20 20 | 20 20 20 20 20 20 20 20 ||.| | |
|00001760| 20 20 2b 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | +-----|--------|
|00001770| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001780| 2d 2d 2d 2d 2d 2d 2d 2b | 20 20 20 20 20 20 20 20 |-------+| |
|00001790| 20 20 20 20 7c 20 7c 0d | 7c 20 20 20 20 20 20 20 | | |.|| |
|000017a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000017b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000017c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000017d0| 20 20 20 20 20 20 20 20 | 20 20 7c 76 7c 0d 7c 5f | | |v|.|_|
|000017e0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000017f0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00001800| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00001810| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00001820| 7c 5f 7c 0d 0d 0d 54 68 | 65 20 70 72 6f 70 65 72 ||_|...Th|e proper|
|00001830| 20 76 61 6c 75 65 73 20 | 66 6f 72 20 74 68 65 20 | values |for the |
|00001840| 76 61 72 69 6f 75 73 20 | 66 69 65 6c 64 73 20 61 |various |fields a|
|00001850| 72 65 20 6e 6f 74 20 61 | 6c 77 61 79 73 20 6f 62 |re not a|lways ob|
|00001860| 76 69 6f 75 73 2e 0d 42 | 65 6c 6f 77 20 69 73 20 |vious..B|elow is |
|00001870| 61 20 67 75 69 64 65 20 | 74 6f 20 61 73 73 69 67 |a guide |to assig|
|00001880| 6e 69 6e 67 20 74 68 65 | 20 63 6f 72 72 65 63 74 |ning the| correct|
|00001890| 20 76 61 6c 75 65 73 2e | 0d 0d 42 6f 75 6e 64 73 | values.|..Bounds|
|000018a0| 52 65 63 74 0d 2d 20 2d | 2d 2d 2d 2d 2d 2d 2d 0d |Rect.- -|-------.|
|000018b0| 54 68 69 73 20 69 73 20 | 74 68 65 20 63 6f 6e 74 |This is |the cont|
|000018c0| 72 6f 6c 27 73 20 72 65 | 63 74 61 6e 67 6c 65 20 |rol's re|ctangle |
|000018d0| 69 6e 20 6c 6f 63 61 6c | 20 63 6f 6f 72 64 69 6e |in local| coordin|
|000018e0| 61 74 65 73 2e 20 54 68 | 65 20 62 6f 75 6e 64 73 |ates. Th|e bounds|
|000018f0| 0d 61 72 65 20 73 68 6f | 77 6e 20 69 6e 20 74 68 |.are sho|wn in th|
|00001900| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 6f 72 64 65 |e follow|ing orde|
|00001910| 72 3a 20 74 6f 70 2c 20 | 6c 65 66 74 2c 20 62 6f |r: top, |left, bo|
|00001920| 74 74 6f 6d 2c 20 72 69 | 67 68 74 2e 0d 0d 56 61 |ttom, ri|ght...Va|
|00001930| 6c 75 65 0d 2d 20 2d 2d | 2d 0d 54 68 69 73 20 69 |lue.- --|-.This i|
|00001940| 73 20 74 68 65 20 69 6e | 69 74 69 61 6c 20 76 61 |s the in|itial va|
|00001950| 6c 75 65 20 6f 66 20 74 | 68 65 20 63 6f 6e 74 72 |lue of t|he contr|
|00001960| 6f 6c 2e 20 49 74 20 73 | 68 6f 75 6c 64 20 62 65 |ol. It s|hould be|
|00001970| 20 67 69 76 65 6e 20 6f | 6e 65 20 6f 66 0d 74 68 | given o|ne of.th|
|00001980| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 76 61 6c 75 |e follow|ing valu|
|00001990| 65 73 2c 20 62 61 73 65 | 64 20 6f 6e 20 74 68 65 |es, base|d on the|
|000019a0| 20 74 79 70 65 20 6f 66 | 20 63 6f 6e 74 72 6f 6c | type of| control|
|000019b0| 20 79 6f 75 20 77 69 73 | 68 20 74 6f 20 63 72 65 | you wis|h to cre|
|000019c0| 61 74 65 3a 0d 0d 20 20 | 20 50 75 73 68 42 75 74 |ate:.. | PushBut|
|000019d0| 74 6f 6e 20 20 3a 20 30 | 0d 0d 20 20 20 43 68 65 |ton : 0|.. Che|
|000019e0| 63 6b 42 6f 78 20 20 20 | 20 3a 20 30 20 3d 20 6e |ckBox | : 0 = n|
|000019f0| 6f 74 20 63 68 65 63 6b | 65 64 0d 20 20 20 20 20 |ot check|ed. |
|00001a00| 20 20 20 20 20 20 20 20 | 20 20 20 20 31 20 3d 20 | | 1 = |
|00001a10| 63 68 65 63 6b 65 64 0d | 0d 20 20 20 52 61 64 69 |checked.|. Radi|
|00001a20| 6f 42 75 74 74 6f 6e 20 | 3a 20 30 20 3d 20 6e 6f |oButton |: 0 = no|
|00001a30| 74 20 73 65 6c 65 63 74 | 65 64 0d 20 20 20 20 20 |t select|ed. |
|00001a40| 20 20 20 20 20 20 20 20 | 20 20 20 20 31 20 3d 20 | | 1 = |
|00001a50| 73 65 6c 65 63 74 65 64 | 0d 0d 20 20 20 53 63 72 |selected|.. Scr|
|00001a60| 6f 6c 6c 42 61 72 20 20 | 20 3a 20 61 6e 79 74 68 |ollBar | : anyth|
|00001a70| 69 6e 67 20 62 65 74 77 | 65 65 6e 20 4d 61 78 20 |ing betw|een Max |
|00001a80| 61 6e 64 20 4d 69 6e 2c | 20 69 6e 63 6c 75 73 69 |and Min,| inclusi|
|00001a90| 76 65 0d 0d 20 20 20 50 | 6f 70 55 70 4d 65 6e 75 |ve.. P|opUpMenu|
|00001aa0| 20 20 20 3a 20 54 68 65 | 20 56 61 6c 75 65 20 70 | : The| Value p|
|00001ab0| 61 72 61 6d 65 74 65 72 | 20 6f 66 20 61 20 70 6f |arameter| of a po|
|00001ac0| 70 2d 75 70 20 6d 65 6e | 75 20 69 73 20 75 73 65 |p-up men|u is use|
|00001ad0| 64 20 77 68 65 6e 0d 20 | 20 20 20 20 20 20 20 20 |d when. | |
|00001ae0| 20 20 20 20 20 20 20 20 | 63 72 65 61 74 69 6e 67 | |creating|
|00001af0| 20 74 68 65 20 6d 65 6e | 75 20 74 6f 20 69 6e 64 | the men|u to ind|
|00001b00| 69 63 61 74 65 20 68 6f | 77 20 74 68 65 20 70 6f |icate ho|w the po|
|00001b10| 70 2d 75 70 27 73 0d 20 | 20 20 20 20 20 20 20 20 |p-up's. | |
|00001b20| 20 20 20 20 20 20 20 20 | 74 69 74 6c 65 20 69 73 | |title is|
|00001b30| 20 74 6f 20 62 65 20 64 | 72 61 77 6e 2e 20 49 74 | to be d|rawn. It|
|00001b40| 20 73 68 6f 75 6c 64 20 | 62 65 20 61 6e 79 20 4f | should |be any O|
|00001b50| 52 65 64 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |Red. | |
|00001b60| 20 20 20 20 20 63 6f 6d | 62 69 6e 61 74 69 6f 6e | com|bination|
|00001b70| 20 28 73 75 6d 29 20 6f | 66 20 74 68 65 20 66 6f | (sum) o|f the fo|
|00001b80| 6c 6c 6f 77 69 6e 67 3a | 0d 0d 20 20 20 20 20 20 |llowing:|.. |
|00001b90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ba0| 30 20 2d 20 6c 65 66 74 | 2d 6a 75 73 74 69 66 69 |0 - left|-justifi|
|00001bb0| 65 64 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ed. | |
|00001bc0| 20 20 20 20 20 20 20 20 | 20 31 20 2d 20 63 65 6e | | 1 - cen|
|00001bd0| 74 65 72 2d 6a 75 73 74 | 69 66 69 65 64 0d 20 20 |ter-just|ified. |
|00001be0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001bf0| 20 20 32 35 35 20 2d 20 | 72 69 67 68 74 2d 6a 75 | 255 - |right-ju|
|00001c00| 73 74 69 66 69 65 64 0d | 20 20 20 20 20 20 20 20 |stified.| |
|00001c10| 20 20 20 20 20 20 20 20 | 20 20 20 20 32 35 36 20 | | 256 |
|00001c20| 2d 20 62 6f 6c 64 20 20 | 20 20 20 20 20 20 20 20 |- bold | |
|00001c30| 20 20 20 34 30 39 36 20 | 2d 20 73 68 61 64 6f 77 | 4096 |- shadow|
|00001c40| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001c50| 20 20 20 20 20 35 31 32 | 20 2d 20 69 74 61 6c 69 | 512| - itali|
|00001c60| 63 20 20 20 20 20 20 20 | 20 20 20 20 38 31 39 32 |c | 8192|
|00001c70| 20 2d 20 63 6f 6e 64 65 | 6e 73 65 64 0d 20 20 20 | - conde|nsed. |
|00001c80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c90| 31 30 32 34 20 2d 20 75 | 6e 64 65 72 6c 69 6e 65 |1024 - u|nderline|
|00001ca0| 64 20 20 20 20 20 20 31 | 36 33 38 34 20 2d 20 65 |d 1|6384 - e|
|00001cb0| 78 74 65 6e 64 65 64 0d | 20 20 20 20 20 20 20 20 |xtended.| |
|00001cc0| 20 20 20 20 20 20 20 20 | 20 20 20 32 30 34 38 20 | | 2048 |
|00001cd0| 2d 20 6f 75 74 6c 69 6e | 65 64 20 20 20 20 20 20 |- outlin|ed |
|00001ce0| 20 20 33 32 37 36 38 20 | 2d 20 70 6c 61 69 6e 0d | 32768 |- plain.|
|00001cf0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001d00| 20 20 41 66 74 65 72 20 | 74 68 65 20 70 6f 70 2d | After |the pop-|
|00001d10| 75 70 20 6d 65 6e 75 20 | 69 73 20 63 72 65 61 74 |up menu |is creat|
|00001d20| 65 64 2c 20 74 68 69 73 | 20 66 69 65 6c 64 0d 20 |ed, this| field. |
|00001d30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001d40| 77 69 6c 6c 20 63 6f 6e | 74 61 69 6e 20 74 68 65 |will con|tain the|
|00001d50| 20 76 61 6c 75 65 20 31 | 2e 0d 0d 56 69 73 69 62 | value 1|...Visib|
|00001d60| 6c 65 0d 2d 20 2d 2d 2d | 2d 2d 0d 54 68 69 73 20 |le.- ---|--.This |
|00001d70| 69 6e 64 69 63 61 74 65 | 73 20 77 68 65 74 68 65 |indicate|s whethe|
|00001d80| 72 20 74 68 65 20 63 6f | 6e 74 72 6f 6c 20 69 73 |r the co|ntrol is|
|00001d90| 20 69 6e 69 74 69 61 6c | 6c 79 20 76 69 73 69 62 | initial|ly visib|
|00001da0| 6c 65 2e 0d 0d 4d 61 78 | 0d 2d 20 2d 0d 54 68 69 |le...Max|.- -.Thi|
|00001db0| 73 20 69 73 20 74 68 65 | 20 6d 61 78 69 6d 75 6d |s is the| maximum|
|00001dc0| 20 76 61 6c 75 65 20 74 | 68 65 20 63 6f 6e 74 72 | value t|he contr|
|00001dd0| 6f 6c 20 6d 61 79 20 61 | 73 73 75 6d 65 2e 20 49 |ol may a|ssume. I|
|00001de0| 74 20 73 68 6f 75 6c 64 | 0d 62 65 20 67 69 76 65 |t should|.be give|
|00001df0| 6e 20 6f 6e 65 20 6f 66 | 20 74 68 65 20 66 6f 6c |n one of| the fol|
|00001e00| 6c 6f 77 69 6e 67 20 76 | 61 6c 75 65 73 3a 0d 0d |lowing v|alues:..|
|00001e10| 20 20 20 50 75 73 68 42 | 75 74 74 6f 6e 20 20 3a | PushB|utton :|
|00001e20| 20 31 0d 20 20 20 43 68 | 65 63 6b 42 75 74 74 6f | 1. Ch|eckButto|
|00001e30| 6e 20 3a 20 31 0d 20 20 | 20 52 61 64 69 6f 42 75 |n : 1. | RadioBu|
|00001e40| 74 74 6f 6e 20 3a 20 31 | 0d 20 20 20 53 63 72 6f |tton : 1|. Scro|
|00001e50| 6c 6c 42 61 72 20 20 20 | 3a 20 61 6e 79 20 76 61 |llBar |: any va|
|00001e60| 6c 75 65 20 61 70 70 72 | 6f 70 72 69 61 74 65 20 |lue appr|opriate |
|00001e70| 74 6f 20 74 68 65 20 61 | 70 70 6c 69 63 61 74 69 |to the a|pplicati|
|00001e80| 6f 6e 0d 20 20 20 50 6f | 70 55 70 4d 65 6e 75 20 |on. Po|pUpMenu |
|00001e90| 20 20 3a 20 77 69 64 74 | 68 20 69 6e 20 70 69 78 | : widt|h in pix|
|00001ea0| 65 6c 73 20 6f 66 20 70 | 6f 70 2d 75 70 20 6d 65 |els of p|op-up me|
|00001eb0| 6e 75 27 73 20 74 69 74 | 6c 65 0d 20 20 20 20 20 |nu's tit|le. |
|00001ec0| 20 20 20 20 20 20 20 20 | 20 20 20 20 28 41 66 74 | | (Aft|
|00001ed0| 65 72 20 74 68 65 20 70 | 6f 70 2d 75 70 20 6d 65 |er the p|op-up me|
|00001ee0| 6e 75 20 69 73 20 63 72 | 65 61 74 65 64 2c 20 74 |nu is cr|eated, t|
|00001ef0| 68 69 73 20 66 69 65 6c | 64 0d 20 20 20 20 20 20 |his fiel|d. |
|00001f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 77 69 6c 6c | | will|
|00001f10| 20 63 6f 6e 74 61 69 6e | 20 74 68 65 20 23 20 6f | contain| the # o|
|00001f20| 66 20 69 74 65 6d 73 20 | 69 6e 20 74 68 65 20 70 |f items |in the p|
|00001f30| 6f 70 2d 75 70 20 6d 65 | 6e 75 2e 29 0d 0d 4d 69 |op-up me|nu.)..Mi|
|00001f40| 6e 0d 2d 20 2d 0d 54 68 | 69 73 20 69 73 20 74 68 |n.- -.Th|is is th|
|00001f50| 65 20 6d 69 6e 69 6d 75 | 6d 20 76 61 6c 75 65 20 |e minimu|m value |
|00001f60| 74 68 65 20 63 6f 6e 74 | 72 6f 6c 20 6d 61 79 20 |the cont|rol may |
|00001f70| 61 73 73 75 6d 65 2e 20 | 49 74 20 73 68 6f 75 6c |assume. |It shoul|
|00001f80| 64 0d 62 65 20 67 69 76 | 65 6e 20 6f 6e 65 20 6f |d.be giv|en one o|
|00001f90| 66 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |f the fo|llowing |
|00001fa0| 76 61 6c 75 65 73 3a 0d | 0d 20 20 20 50 75 73 68 |values:.|. Push|
|00001fb0| 42 75 74 74 6f 6e 20 20 | 3a 20 30 0d 20 20 20 43 |Button |: 0. C|
|00001fc0| 68 65 63 6b 42 75 74 74 | 6f 6e 20 3a 20 30 0d 20 |heckButt|on : 0. |
|00001fd0| 20 20 52 61 64 69 6f 42 | 75 74 74 6f 6e 20 3a 20 | RadioB|utton : |
|00001fe0| 30 0d 20 20 20 53 63 72 | 6f 6c 6c 42 61 72 20 20 |0. Scr|ollBar |
|00001ff0| 20 3a 20 61 6e 79 20 76 | 61 6c 75 65 20 61 70 70 | : any v|alue app|
|00002000| 72 6f 70 72 69 61 74 65 | 20 74 6f 20 74 68 65 20 |ropriate| to the |
|00002010| 61 70 70 6c 69 63 61 74 | 69 6f 6e 0d 20 20 20 50 |applicat|ion. P|
|00002020| 6f 70 55 70 4d 65 6e 75 | 20 20 20 3a 20 72 65 73 |opUpMenu| : res|
|00002030| 6f 75 72 63 65 20 49 44 | 20 6f 66 20 6d 65 6e 75 |ource ID| of menu|
|00002040| 20 74 6f 20 70 6f 70 20 | 75 70 0d 20 20 20 20 20 | to pop |up. |
|00002050| 20 20 20 20 20 20 20 20 | 20 20 20 20 28 41 66 74 | | (Aft|
|00002060| 65 72 20 74 68 65 20 70 | 6f 70 2d 75 70 20 6d 65 |er the p|op-up me|
|00002070| 6e 75 20 69 73 20 63 72 | 65 61 74 65 64 2c 0d 20 |nu is cr|eated,. |
|00002080| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002090| 20 74 68 69 73 20 66 69 | 65 6c 64 20 77 69 6c 6c | this fi|eld will|
|000020a0| 20 63 6f 6e 74 61 69 6e | 20 74 68 65 20 76 61 6c | contain| the val|
|000020b0| 75 65 20 31 2e 29 0d 0d | 50 72 6f 63 49 44 0d 2d |ue 1.)..|ProcID.-|
|000020c0| 20 2d 2d 2d 2d 0d 54 68 | 69 73 20 69 6e 64 69 63 | ----.Th|is indic|
|000020d0| 61 74 65 73 20 77 68 69 | 63 68 20 74 79 70 65 20 |ates whi|ch type |
|000020e0| 6f 66 20 63 6f 6e 74 72 | 6f 6c 20 74 6f 20 63 72 |of contr|ol to cr|
|000020f0| 65 61 74 65 2c 20 61 6e | 64 20 61 6c 73 6f 20 77 |eate, an|d also w|
|00002100| 68 69 63 68 0d 66 6f 6e | 74 20 74 6f 20 75 73 65 |hich.fon|t to use|
|00002110| 20 77 68 65 6e 20 64 72 | 61 77 69 6e 67 20 74 68 | when dr|awing th|
|00002120| 65 20 63 6f 6e 74 72 6f | 6c 27 73 20 74 69 74 6c |e contro|l's titl|
|00002130| 65 20 61 6e 64 20 6f 74 | 68 65 72 20 74 65 78 74 |e and ot|her text|
|00002140| 2e 20 49 74 0d 73 68 6f | 75 6c 64 20 62 65 20 67 |. It.sho|uld be g|
|00002150| 69 76 65 6e 20 6f 6e 65 | 20 6f 66 20 74 68 65 20 |iven one| of the |
|00002160| 66 6f 6c 6c 6f 77 69 6e | 67 20 76 61 6c 75 65 73 |followin|g values|
|00002170| 3a 0d 0d 20 20 20 50 75 | 73 68 42 75 74 74 6f 6e |:.. Pu|shButton|
|00002180| 2c 20 20 69 6e 20 73 79 | 73 74 65 6d 20 66 6f 6e |, in sy|stem fon|
|00002190| 74 20 3a 20 20 20 20 30 | 0d 20 20 20 20 20 20 20 |t : 0|. |
|000021a0| 20 20 20 20 20 20 20 20 | 20 69 6e 20 77 69 6e 64 | | in wind|
|000021b0| 6f 77 20 66 6f 6e 74 20 | 3a 20 20 20 20 38 0d 0d |ow font |: 8..|
|000021c0| 20 20 20 43 68 65 63 6b | 42 75 74 74 6f 6e 2c 20 | Check|Button, |
|000021d0| 69 6e 20 73 79 73 74 65 | 6d 20 66 6f 6e 74 20 3a |in syste|m font :|
|000021e0| 20 20 20 20 31 0d 20 20 | 20 20 20 20 20 20 20 20 | 1. | |
|000021f0| 20 20 20 20 20 20 69 6e | 20 77 69 6e 64 6f 77 20 | in| window |
|00002200| 66 6f 6e 74 20 3a 20 20 | 20 20 39 0d 0d 20 20 20 |font : | 9.. |
|00002210| 52 61 64 69 6f 42 75 74 | 74 6f 6e 2c 20 69 6e 20 |RadioBut|ton, in |
|00002220| 73 79 73 74 65 6d 20 66 | 6f 6e 74 20 3a 20 20 20 |system f|ont : |
|00002230| 20 32 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | 2. | |
|00002240| 20 20 20 69 6e 20 77 69 | 6e 64 6f 77 20 66 6f 6e | in wi|ndow fon|
|00002250| 74 20 3a 20 20 20 31 30 | 0d 0d 20 20 20 50 6f 70 |t : 10|.. Pop|
|00002260| 55 70 4d 65 6e 75 20 2e | 2e 2e 2e 2e 2e 2e 2e 2e |UpMenu .|........|
|00002270| 2e 2e 2e 2e 2e 2e 2e 2e | 20 3a 20 31 30 30 38 20 |........| : 1008 |
|00002280| 2a 0d 0d 20 20 20 2a 20 | 50 6f 70 55 70 4d 65 6e |*.. * |PopUpMen|
|00002290| 75 20 62 65 68 61 76 69 | 6f 72 20 63 61 6e 20 62 |u behavi|or can b|
|000022a0| 65 20 61 66 66 65 63 74 | 65 64 20 62 79 20 4f 52 |e affect|ed by OR|
|000022b0| 69 6e 67 20 28 73 75 6d | 6d 69 6e 67 29 20 74 68 |ing (sum|ming) th|
|000022c0| 65 0d 20 20 20 20 20 50 | 72 6f 63 49 44 20 77 69 |e. P|rocID wi|
|000022d0| 74 68 20 61 6e 79 20 6f | 66 20 74 68 65 20 66 6f |th any o|f the fo|
|000022e0| 6c 6c 6f 77 69 6e 67 3a | 0d 20 20 20 20 20 20 20 |llowing:|. |
|000022f0| 20 31 20 2d 20 64 6f 6e | 27 74 20 64 79 6e 61 6d | 1 - don|'t dynam|
|00002300| 69 63 61 6c 6c 79 20 61 | 64 6a 75 73 74 20 70 6f |ically a|djust po|
|00002310| 70 2d 75 70 27 73 20 77 | 69 64 74 68 20 74 6f 20 |p-up's w|idth to |
|00002320| 61 63 63 6f 6d 6d 6f 64 | 61 74 65 0d 20 20 20 20 |accommod|ate. |
|00002330| 20 20 20 20 20 20 20 20 | 6c 6f 6e 67 20 6d 65 6e | |long men|
|00002340| 75 20 69 74 65 6d 73 0d | 20 20 20 20 20 20 20 20 |u items.| |
|00002350| 38 20 2d 20 75 73 65 20 | 74 68 65 20 67 72 61 66 |8 - use |the graf|
|00002360| 50 6f 72 74 27 73 20 66 | 6f 6e 74 20 74 6f 20 64 |Port's f|ont to d|
|00002370| 72 61 77 20 74 68 65 20 | 63 6f 6e 74 72 6f 6c 27 |raw the |control'|
|00002380| 73 20 74 65 78 74 0d 20 | 20 20 20 20 20 20 20 34 |s text. | 4|
|00002390| 20 2d 20 69 67 6e 6f 72 | 65 20 22 6d 69 6e 22 20 | - ignor|e "min" |
|000023a0| 66 69 65 6c 64 3b 20 69 | 6e 73 74 65 61 64 2c 20 |field; i|nstead, |
|000023b0| 62 75 69 6c 64 20 61 20 | 6d 65 6e 75 20 6c 69 73 |build a |menu lis|
|000023c0| 74 69 6e 67 20 61 6c 6c | 0d 20 20 20 20 20 20 20 |ting all|. |
|000023d0| 20 20 20 20 20 61 76 61 | 69 6c 61 62 6c 65 20 72 | ava|ilable r|
|000023e0| 65 73 6f 75 72 63 65 73 | 20 6f 66 20 74 68 65 20 |esources| of the |
|000023f0| 74 79 70 65 20 63 6f 6e | 74 61 69 6e 65 64 20 69 |type con|tained i|
|00002400| 6e 20 22 72 65 66 43 6f | 6e 22 0d 20 20 20 20 20 |n "refCo|n". |
|00002410| 20 20 20 20 20 20 20 66 | 69 65 6c 64 0d 20 20 20 | f|ield. |
|00002420| 20 20 54 68 75 73 20 74 | 68 65 20 66 6f 6c 6c 6f | Thus t|he follo|
|00002430| 77 69 6e 67 20 61 72 65 | 20 76 61 6c 69 64 20 50 |wing are| valid P|
|00002440| 72 6f 63 49 44 20 76 61 | 6c 75 65 73 20 66 6f 72 |rocID va|lues for|
|00002450| 20 61 20 70 6f 70 55 70 | 4d 65 6e 75 3a 0d 20 20 | a popUp|Menu:. |
|00002460| 20 20 20 20 20 20 31 30 | 30 38 20 2d 20 64 79 6e | 10|08 - dyn|
|00002470| 61 6d 69 63 20 6d 65 6e | 75 20 77 69 64 74 68 20 |amic men|u width |
|00002480| 2d 20 73 79 73 74 65 6d | 20 66 6f 6e 74 20 2d 20 |- system| font - |
|00002490| 6d 65 6e 75 20 66 72 6f | 6d 20 22 4d 69 6e 22 0d |menu fro|m "Min".|
|000024a0| 20 20 20 20 20 20 20 20 | 31 30 30 39 20 2d 20 66 | |1009 - f|
|000024b0| 69 78 65 64 20 6d 65 6e | 75 20 77 69 64 74 68 20 |ixed men|u width |
|000024c0| 20 20 2d 20 73 79 73 74 | 65 6d 20 66 6f 6e 74 20 | - syst|em font |
|000024d0| 2d 20 6d 65 6e 75 20 66 | 72 6f 6d 20 22 4d 69 6e |- menu f|rom "Min|
|000024e0| 22 0d 20 20 20 20 20 20 | 20 20 31 30 31 32 20 2d |". | 1012 -|
|000024f0| 20 64 79 6e 61 6d 69 63 | 20 6d 65 6e 75 20 77 69 | dynamic| menu wi|
|00002500| 64 74 68 20 2d 20 73 79 | 73 74 65 6d 20 66 6f 6e |dth - sy|stem fon|
|00002510| 74 20 2d 20 6c 69 73 74 | 20 61 20 72 65 73 54 79 |t - list| a resTy|
|00002520| 70 65 0d 20 20 20 20 20 | 20 20 20 31 30 31 33 20 |pe. | 1013 |
|00002530| 2d 20 66 69 78 65 64 20 | 6d 65 6e 75 20 77 69 64 |- fixed |menu wid|
|00002540| 74 68 20 20 20 2d 20 73 | 79 73 74 65 6d 20 66 6f |th - s|ystem fo|
|00002550| 6e 74 20 2d 20 6c 69 73 | 74 20 61 20 72 65 73 54 |nt - lis|t a resT|
|00002560| 79 70 65 0d 20 20 20 20 | 20 20 20 20 31 30 31 36 |ype. | 1016|
|00002570| 20 2d 20 64 79 6e 61 6d | 69 63 20 6d 65 6e 75 20 | - dynam|ic menu |
|00002580| 77 69 64 74 68 20 2d 20 | 77 69 6e 64 6f 77 20 66 |width - |window f|
|00002590| 6f 6e 74 20 2d 20 6d 65 | 6e 75 20 66 72 6f 6d 20 |ont - me|nu from |
|000025a0| 22 4d 69 6e 22 0d 20 20 | 20 20 20 20 20 20 31 30 |"Min". | 10|
|000025b0| 31 37 20 2d 20 66 69 78 | 65 64 20 6d 65 6e 75 20 |17 - fix|ed menu |
|000025c0| 77 69 64 74 68 20 20 20 | 2d 20 77 69 6e 64 6f 77 |width |- window|
|000025d0| 20 66 6f 6e 74 20 2d 20 | 6d 65 6e 75 20 66 72 6f | font - |menu fro|
|000025e0| 6d 20 22 4d 69 6e 22 0d | 20 20 20 20 20 20 20 20 |m "Min".| |
|000025f0| 31 30 32 30 20 2d 20 64 | 79 6e 61 6d 69 63 20 6d |1020 - d|ynamic m|
|00002600| 65 6e 75 20 77 69 64 74 | 68 20 2d 20 77 69 6e 64 |enu widt|h - wind|
|00002610| 6f 77 20 66 6f 6e 74 20 | 2d 20 6c 69 73 74 20 61 |ow font |- list a|
|00002620| 20 72 65 73 54 79 70 65 | 0d 20 20 20 20 20 20 20 | resType|. |
|00002630| 20 31 30 32 31 20 2d 20 | 66 69 78 65 64 20 6d 65 | 1021 - |fixed me|
|00002640| 6e 75 20 77 69 64 74 68 | 20 20 20 2d 20 77 69 6e |nu width| - win|
|00002650| 64 6f 77 20 66 6f 6e 74 | 20 2d 20 6c 69 73 74 20 |dow font| - list |
|00002660| 61 20 72 65 73 54 79 70 | 65 0d 0d 52 65 66 43 6f |a resTyp|e..RefCo|
|00002670| 6e 0d 2d 20 2d 2d 2d 2d | 0d 54 68 69 73 20 33 32 |n.- ----|.This 32|
|00002680| 2d 62 69 74 20 76 61 6c | 75 65 20 63 61 6e 20 62 |-bit val|ue can b|
|00002690| 65 20 75 73 65 64 20 62 | 79 20 79 6f 75 72 20 61 |e used b|y your a|
|000026a0| 70 70 20 69 6e 20 61 6e | 79 20 77 61 79 20 79 6f |pp in an|y way yo|
|000026b0| 75 20 77 69 73 68 2e 0d | 0d 46 6f 72 20 70 6f 70 |u wish..|.For pop|
|000026c0| 55 70 4d 65 6e 75 73 2c | 20 74 68 69 73 20 66 69 |UpMenus,| this fi|
|000026d0| 65 6c 64 20 6d 61 79 20 | 28 64 65 70 65 6e 64 69 |eld may |(dependi|
|000026e0| 6e 67 20 6f 6e 20 74 68 | 65 20 76 61 6c 75 65 20 |ng on th|e value |
|000026f0| 6f 66 20 22 50 72 6f 63 | 49 44 22 0d 61 62 6f 76 |of "Proc|ID".abov|
|00002700| 65 29 20 62 65 20 75 73 | 65 64 20 64 75 72 69 6e |e) be us|ed durin|
|00002710| 67 20 63 72 65 61 74 69 | 6f 6e 20 6f 66 20 74 68 |g creati|on of th|
|00002720| 65 20 70 6f 70 55 70 4d | 65 6e 75 20 61 6e 64 20 |e popUpM|enu and |
|00002730| 63 6f 6e 74 61 69 6e 20 | 61 0d 34 2d 63 68 61 72 |contain |a.4-char|
|00002740| 61 63 74 65 72 20 72 65 | 73 6f 75 72 63 65 20 74 |acter re|source t|
|00002750| 79 70 65 2e 0d 0d 54 69 | 74 6c 65 0d 2d 20 2d 2d |ype...Ti|tle.- --|
|00002760| 2d 0d 54 68 69 73 20 69 | 73 20 74 68 65 20 63 6f |-.This i|s the co|
|00002770| 6e 74 72 6f 6c 27 73 20 | 74 69 74 6c 65 2e 20 54 |ntrol's |title. T|
|00002780| 68 69 73 20 74 65 78 74 | 20 73 68 6f 77 73 20 75 |his text| shows u|
|00002790| 70 20 69 6e 73 69 64 65 | 20 61 20 70 75 73 68 42 |p inside| a pushB|
|000027a0| 75 74 74 6f 6e 2c 0d 6f | 72 20 62 65 73 69 64 65 |utton,.o|r beside|
|000027b0| 20 61 20 63 68 65 63 6b | 42 6f 78 2c 20 72 61 64 | a check|Box, rad|
|000027c0| 69 6f 42 75 74 74 6f 6e | 20 6f 72 20 70 6f 70 55 |ioButton| or popU|
|000027d0| 70 4d 65 6e 75 2e 20 46 | 6f 72 20 73 63 72 6f 6c |pMenu. F|or scrol|
|000027e0| 6c 42 61 72 73 20 69 74 | 0d 72 65 6d 61 69 6e 73 |lBars it|.remains|
|000027f0| 20 69 6e 76 69 73 69 62 | 6c 65 2c 20 62 75 74 20 | invisib|le, but |
|00002800| 73 74 69 6c 6c 20 63 61 | 6e 20 62 65 20 75 73 65 |still ca|n be use|
|00002810| 64 2c 20 65 2e 67 2e 2c | 20 74 6f 20 73 65 61 72 |d, e.g.,| to sear|
|00002820| 63 68 20 61 20 77 69 6e | 64 6f 77 27 73 0d 63 6f |ch a win|dow's.co|
|00002830| 6e 74 72 6f 6c 73 20 62 | 79 20 74 69 74 6c 65 2e |ntrols b|y title.|
|00002840| 0d 0d 0d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |...=====|========|
|00002850| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 0d |========|=======.|
|00002860| 44 69 61 6c 6f 67 73 2c | 20 43 6f 6e 74 72 6f 6c |Dialogs,| Control|
|00002870| 73 2c 20 61 6e 64 20 46 | 6f 6e 74 73 0d 3d 3d 3d |s, and F|onts.===|
|00002880| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002890| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 0d 0d 41 20 71 75 65 |========|=..A que|
|000028a0| 73 74 69 6f 6e 20 74 68 | 61 74 20 6f 66 74 65 6e |stion th|at often|
|000028b0| 20 61 72 69 73 65 73 20 | 69 73 20 68 6f 77 20 74 | arises |is how t|
|000028c0| 6f 20 67 65 74 20 70 75 | 73 68 42 75 74 74 6f 6e |o get pu|shButton|
|000028d0| 73 2c 20 63 68 65 63 6b | 42 6f 78 65 73 2c 0d 72 |s, check|Boxes,.r|
|000028e0| 61 64 69 6f 42 75 74 74 | 6f 6e 73 2c 20 61 6e 64 |adioButt|ons, and|
|000028f0| 2f 6f 72 20 70 6f 70 55 | 70 4d 65 6e 75 73 20 69 |/or popU|pMenus i|
|00002900| 6e 20 61 20 64 69 61 6c | 6f 67 20 74 6f 20 62 65 |n a dial|og to be|
|00002910| 20 64 72 61 77 6e 20 77 | 69 74 68 20 61 20 66 6f | drawn w|ith a fo|
|00002920| 6e 74 0d 6f 74 68 65 72 | 20 74 68 61 6e 20 74 68 |nt.other| than th|
|00002930| 65 20 73 79 73 74 65 6d | 20 66 6f 6e 74 2e 20 54 |e system| font. T|
|00002940| 68 65 72 65 20 61 72 65 | 20 73 65 76 65 72 61 6c |here are| several|
|00002950| 20 77 61 79 73 20 74 6f | 20 64 6f 20 74 68 69 73 | ways to| do this|
|00002960| 2c 20 6f 6e 65 0d 6f 66 | 20 77 68 69 63 68 20 69 |, one.of| which i|
|00002970| 73 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 3a |s the fo|llowing:|
|00002980| 0d 0d 49 6e 20 74 68 65 | 20 44 49 54 4c 20 65 64 |..In the| DITL ed|
|00002990| 69 74 6f 72 2c 20 72 61 | 74 68 65 72 20 74 68 61 |itor, ra|ther tha|
|000029a0| 6e 20 63 72 65 61 74 69 | 6e 67 20 65 61 63 68 20 |n creati|ng each |
|000029b0| 63 6f 6e 74 72 6f 6c 20 | 61 73 20 74 68 65 20 74 |control |as the t|
|000029c0| 79 70 65 20 6f 66 0d 63 | 6f 6e 74 72 6f 6c 20 79 |ype of.c|ontrol y|
|000029d0| 6f 75 20 75 6c 74 69 6d | 61 74 65 6c 79 20 77 61 |ou ultim|ately wa|
|000029e0| 6e 74 20 69 74 20 74 6f | 20 62 65 2c 20 69 6e 73 |nt it to| be, ins|
|000029f0| 74 65 61 64 20 63 72 65 | 61 74 65 20 69 74 20 61 |tead cre|ate it a|
|00002a00| 73 20 61 20 67 65 6e 65 | 72 69 63 0d 63 6f 6e 74 |s a gene|ric.cont|
|00002a10| 72 6f 6c 2e 20 54 68 65 | 6e 2c 20 69 6e 20 74 68 |rol. The|n, in th|
|00002a20| 65 20 43 4e 54 4c 20 65 | 64 69 74 6f 72 2c 20 79 |e CNTL e|ditor, y|
|00002a30| 6f 75 20 63 61 6e 20 73 | 70 65 63 69 66 79 20 74 |ou can s|pecify t|
|00002a40| 68 65 20 50 72 6f 63 49 | 44 20 74 68 61 74 0d 77 |he ProcI|D that.w|
|00002a50| 69 6c 6c 20 63 61 75 73 | 65 20 74 68 65 20 63 6f |ill caus|e the co|
|00002a60| 6e 74 72 6f 6c 20 74 6f | 20 62 65 20 64 72 61 77 |ntrol to| be draw|
|00002a70| 6e 20 69 6e 20 74 68 65 | 20 64 69 61 6c 6f 67 27 |n in the| dialog'|
|00002a80| 73 20 66 6f 6e 74 20 69 | 6e 73 74 65 61 64 20 6f |s font i|nstead o|
|00002a90| 66 0d 74 68 65 20 73 79 | 73 74 65 6d 20 66 6f 6e |f.the sy|stem fon|
|00002aa0| 74 2e 20 28 54 68 61 6e | 6b 73 20 74 6f 20 4a 65 |t. (Than|ks to Je|
|00002ab0| 6e 73 20 41 6c 66 6b 65 | 20 5b 6a 65 6e 73 5f 61 |ns Alfke| [jens_a|
|00002ac0| 6c 66 6b 65 40 70 6f 77 | 65 72 74 61 6c 6b 2e 61 |lfke@pow|ertalk.a|
|00002ad0| 70 70 6c 65 2e 63 6f 6d | 5d 0d 66 6f 72 20 74 68 |pple.com|].for th|
|00002ae0| 69 73 20 6f 6e 65 2e 29 | 20 4f 74 68 65 72 77 69 |is one.)| Otherwi|
|00002af0| 73 65 2c 20 74 68 65 20 | 64 69 61 6c 6f 67 20 6d |se, the |dialog m|
|00002b00| 61 6e 61 67 65 72 20 63 | 72 65 61 74 65 73 20 74 |anager c|reates t|
|00002b10| 68 65 20 63 6f 6e 74 72 | 6f 6c 73 0d 66 6f 72 20 |he contr|ols.for |
|00002b20| 79 6f 75 2c 20 61 6e 64 | 20 69 74 20 77 69 6c 6c |you, and| it will|
|00002b30| 20 75 73 65 20 50 72 6f | 63 49 44 20 76 61 6c 75 | use Pro|cID valu|
|00002b40| 65 73 20 73 70 65 63 69 | 66 79 69 6e 67 20 75 73 |es speci|fying us|
|00002b50| 65 20 6f 66 20 74 68 65 | 20 73 79 73 74 65 6d 0d |e of the| system.|
|00002b60| 66 6f 6e 74 20 77 68 65 | 6e 20 64 72 61 77 69 6e |font whe|n drawin|
|00002b70| 67 20 74 68 65 20 63 6f | 6e 74 72 6f 6c 73 2e 20 |g the co|ntrols. |
|00002b80| 4f 6e 63 65 20 74 68 65 | 73 65 20 63 6f 6e 74 72 |Once the|se contr|
|00002b90| 6f 6c 73 20 61 72 65 20 | 63 72 65 61 74 65 64 2c |ols are |created,|
|00002ba0| 20 74 68 65 72 65 0d 73 | 65 65 6d 73 20 74 6f 20 | there.s|eems to |
|00002bb0| 62 65 20 6e 6f 20 77 61 | 79 20 74 6f 20 63 68 61 |be no wa|y to cha|
|00002bc0| 6e 67 65 20 74 68 69 73 | 20 61 73 70 65 63 74 20 |nge this| aspect |
|00002bd0| 6f 66 20 74 68 65 6d 3b | 20 41 70 70 6c 65 20 68 |of them;| Apple h|
|00002be0| 61 73 20 70 72 6f 76 69 | 64 65 64 0d 61 20 22 47 |as provi|ded.a "G|
|00002bf0| 65 74 43 56 61 72 69 61 | 6e 74 22 20 63 61 6c 6c |etCVaria|nt" call|
|00002c00| 20 62 75 74 20 6e 6f 20 | 22 53 65 74 43 56 61 72 | but no |"SetCVar|
|00002c10| 69 61 6e 74 22 20 63 61 | 6c 6c 2e 0d 0d 54 6f 20 |iant" ca|ll...To |
|00002c20| 63 68 61 6e 67 65 20 74 | 68 65 20 66 6f 6e 74 20 |change t|he font |
|00002c30| 6f 66 20 73 74 61 74 54 | 65 78 74 20 61 6e 64 20 |of statT|ext and |
|00002c40| 65 64 69 74 54 65 78 74 | 20 69 74 65 6d 73 2c 20 |editText| items, |
|00002c50| 79 6f 75 20 6d 75 73 74 | 20 74 61 6b 65 0d 61 20 |you must| take.a |
|00002c60| 64 69 66 66 65 72 65 6e | 74 20 61 70 70 72 6f 61 |differen|t approa|
|00002c70| 63 68 2e 20 4f 6e 63 65 | 20 74 68 65 20 64 69 61 |ch. Once| the dia|
|00002c80| 6c 6f 67 20 68 61 73 20 | 62 65 65 6e 20 63 72 65 |log has |been cre|
|00002c90| 61 74 65 64 2c 20 63 61 | 6c 6c 20 61 0d 72 6f 75 |ated, ca|ll a.rou|
|00002ca0| 74 69 6e 65 20 6c 69 6b | 65 20 74 68 65 20 66 6f |tine lik|e the fo|
|00002cb0| 6c 6c 6f 77 69 6e 67 3a | 0d 0d 2f 2a 2a 2a 2a 2a |llowing:|../*****|
|00002cc0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002cd0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002ce0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002cf0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002d00| 2a 0d 2a 0d 2a 20 20 46 | 55 4e 43 54 49 4f 4e 3a |*.*.* F|UNCTION:|
|00002d10| 20 20 20 20 53 65 74 44 | 69 61 6c 6f 67 46 6f 6e | SetD|ialogFon|
|00002d20| 74 41 6e 64 53 69 7a 65 | 28 20 44 69 61 6c 6f 67 |tAndSize|( Dialog|
|00002d30| 50 74 72 20 74 68 65 44 | 69 61 6c 6f 67 2c 0d 2a |Ptr theD|ialog,.*|
|00002d40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002d50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002d60| 20 20 20 20 20 73 68 6f | 72 74 20 20 20 20 20 66 | sho|rt f|
|00002d70| 6f 6e 74 4e 75 6d 2c 0d | 2a 20 20 20 20 20 20 20 |ontNum,.|* |
|00002d80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002d90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 73 68 | | sh|
|00002da0| 6f 72 74 20 20 20 20 20 | 66 6f 6e 74 53 69 7a 65 |ort |fontSize|
|00002db0| 20 20 20 20 29 0d 2a 0d | 2a 20 20 44 45 53 43 52 | ).*.|* DESCR|
|00002dc0| 49 50 54 49 4f 4e 3a 20 | 54 68 69 73 20 66 75 6e |IPTION: |This fun|
|00002dd0| 63 74 69 6f 6e 20 73 65 | 74 73 20 74 68 65 20 66 |ction se|ts the f|
|00002de0| 6f 6e 74 20 61 6e 64 20 | 73 69 7a 65 20 74 6f 20 |ont and |size to |
|00002df0| 62 65 20 75 73 65 64 0d | 2a 20 20 20 20 20 20 20 |be used.|* |
|00002e00| 20 20 20 20 20 20 20 20 | 73 75 62 73 65 71 75 65 | |subseque|
|00002e10| 6e 74 6c 79 20 62 79 20 | 73 74 61 74 69 63 2d 74 |ntly by |static-t|
|00002e20| 65 78 74 20 61 6e 64 20 | 65 64 69 74 2d 74 65 78 |ext and |edit-tex|
|00002e30| 74 20 69 74 65 6d 73 0d | 2a 20 20 20 20 20 20 20 |t items.|* |
|00002e40| 20 20 20 20 20 20 20 20 | 6f 66 20 61 20 64 69 61 | |of a dia|
|00002e50| 6c 6f 67 2e 0d 2a 0d 2a | 20 20 57 52 49 54 54 45 |log..*.*| WRITTE|
|00002e60| 4e 20 42 59 3a 20 20 6a | 61 72 65 7a 69 6e 61 40 |N BY: j|arezina@|
|00002e70| 6d 61 67 6e 75 73 2e 61 | 63 73 2e 6f 68 69 6f 2d |magnus.a|cs.ohio-|
|00002e80| 73 74 61 74 65 2e 65 64 | 75 0d 2a 20 20 20 20 20 |state.ed|u.* |
|00002e90| 20 20 20 20 20 20 20 20 | 20 20 28 4a 61 73 6e 61 | | (Jasna|
|00002ea0| 20 4d 2e 20 41 72 65 7a | 69 6e 61 2d 57 69 6c 73 | M. Arez|ina-Wils|
|00002eb0| 6f 6e 29 0d 2a 0d 2a 20 | 20 4d 4f 44 49 46 49 45 |on).*.* | MODIFIE|
|00002ec0| 44 20 42 59 3a 20 4a 65 | 66 66 72 65 79 20 43 2e |D BY: Je|ffrey C.|
|00002ed0| 20 52 6f 67 65 72 73 0d | 2a 20 20 20 20 20 20 20 | Rogers.|* |
|00002ee0| 20 20 20 20 20 20 20 20 | 28 6a 72 6f 67 65 72 73 | |(jrogers|
|00002ef0| 40 6d 69 74 72 65 2e 6f | 72 67 29 0d 2a 0d 2a 2a |@mitre.o|rg).*.**|
|00002f00| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2f 0d |********|******/.|
|00002f10| 0d 76 6f 69 64 20 53 65 | 74 44 69 61 6c 6f 67 46 |.void Se|tDialogF|
|00002f20| 6f 6e 74 41 6e 64 53 69 | 7a 65 28 20 44 69 61 6c |ontAndSi|ze( Dial|
|00002f30| 6f 67 50 74 72 20 74 68 | 65 44 69 61 6c 6f 67 2c |ogPtr th|eDialog,|
|00002f40| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00002f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 73 68 6f 72 | | shor|
|00002f60| 74 20 20 20 20 20 66 6f | 6e 74 4e 75 6d 2c 0d 20 |t fo|ntNum,. |
|00002f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002f80| 20 20 20 20 20 20 20 20 | 20 20 73 68 6f 72 74 20 | | short |
|00002f90| 20 20 20 20 66 6f 6e 74 | 53 69 7a 65 20 20 20 29 | font|Size )|
|00002fa0| 0d 7b 0d 20 20 46 6f 6e | 74 49 6e 66 6f 20 20 20 |.{. Fon|tInfo |
|00002fb0| 66 20 3b 0d 20 20 47 72 | 61 66 50 74 72 20 20 20 |f ;. Gr|afPtr |
|00002fc0| 20 73 61 76 65 64 50 6f | 72 74 20 3b 0d 20 20 0d | savedPo|rt ;. .|
|00002fd0| 20 20 2f 2f 20 53 74 6f | 72 65 20 74 68 65 20 63 | // Sto|re the c|
|00002fe0| 75 72 72 65 6e 74 20 67 | 72 61 66 50 6f 72 74 2c |urrent g|rafPort,|
|00002ff0| 20 74 68 65 6e 20 63 68 | 61 6e 67 65 20 74 6f 20 | then ch|ange to |
|00003000| 74 68 65 20 64 69 61 6c | 6f 67 2e 0d 20 20 0d 20 |the dial|og.. . |
|00003010| 20 47 65 74 50 6f 72 74 | 28 20 26 73 61 76 65 64 | GetPort|( &saved|
|00003020| 50 6f 72 74 20 29 3b 0d | 20 20 53 65 74 50 6f 72 |Port );.| SetPor|
|00003030| 74 28 20 74 68 65 44 69 | 61 6c 6f 67 20 29 3b 0d |t( theDi|alog );.|
|00003040| 20 20 0d 20 20 2f 2f 20 | 53 65 74 20 75 70 20 74 | . // |Set up t|
|00003050| 68 65 20 64 69 61 6c 6f | 67 27 73 20 67 72 61 66 |he dialo|g's graf|
|00003060| 50 6f 72 74 20 66 6f 6e | 74 20 69 6e 66 6f 2e 0d |Port fon|t info..|
|00003070| 20 20 0d 20 20 54 65 78 | 74 46 6f 6e 74 28 20 66 | . Tex|tFont( f|
|00003080| 6f 6e 74 4e 75 6d 20 29 | 3b 0d 20 20 54 65 78 74 |ontNum )|;. Text|
|00003090| 53 69 7a 65 28 20 66 6f | 6e 74 53 69 7a 65 20 29 |Size( fo|ntSize )|
|000030a0| 3b 0d 20 20 0d 20 20 2f | 2f 20 44 65 61 6c 20 77 |;. . /|/ Deal w|
|000030b0| 69 74 68 20 74 68 65 20 | 73 74 61 74 69 63 20 26 |ith the |static &|
|000030c0| 20 65 64 69 74 20 74 65 | 78 74 20 69 74 65 6d 73 | edit te|xt items|
|000030d0| 2e 0d 20 20 0d 20 20 47 | 65 74 46 6f 6e 74 49 6e |.. . G|etFontIn|
|000030e0| 66 6f 28 20 26 66 20 29 | 3b 0d 20 20 28 2a 28 28 |fo( &f )|;. (*((|
|000030f0| 44 69 61 6c 6f 67 50 65 | 65 6b 29 74 68 65 44 69 |DialogPe|ek)theDi|
|00003100| 61 6c 6f 67 29 2d 3e 74 | 65 78 74 48 29 2d 3e 74 |alog)->t|extH)->t|
|00003110| 78 46 6f 6e 74 20 3d 20 | 66 6f 6e 74 4e 75 6d 20 |xFont = |fontNum |
|00003120| 3b 0d 20 20 28 2a 28 28 | 44 69 61 6c 6f 67 50 65 |;. (*((|DialogPe|
|00003130| 65 6b 29 74 68 65 44 69 | 61 6c 6f 67 29 2d 3e 74 |ek)theDi|alog)->t|
|00003140| 65 78 74 48 29 2d 3e 74 | 78 53 69 7a 65 20 3d 20 |extH)->t|xSize = |
|00003150| 66 6f 6e 74 53 69 7a 65 | 20 3b 0d 20 20 28 2a 28 |fontSize| ;. (*(|
|00003160| 28 44 69 61 6c 6f 67 50 | 65 65 6b 29 74 68 65 44 |(DialogP|eek)theD|
|00003170| 69 61 6c 6f 67 29 2d 3e | 74 65 78 74 48 29 2d 3e |ialog)->|textH)->|
|00003180| 6c 69 6e 65 48 65 69 67 | 68 74 20 3d 20 66 2e 61 |lineHeig|ht = f.a|
|00003190| 73 63 65 6e 74 20 2b 20 | 66 2e 64 65 73 63 65 6e |scent + |f.descen|
|000031a0| 74 20 2b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |t +. | |
|000031b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000031c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000031d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000031e0| 20 66 2e 6c 65 61 64 69 | 6e 67 20 3b 0d 20 20 28 | f.leadi|ng ;. (|
|000031f0| 2a 28 28 44 69 61 6c 6f | 67 50 65 65 6b 29 74 68 |*((Dialo|gPeek)th|
|00003200| 65 44 69 61 6c 6f 67 29 | 2d 3e 74 65 78 74 48 29 |eDialog)|->textH)|
|00003210| 2d 3e 66 6f 6e 74 41 73 | 63 65 6e 74 20 3d 20 66 |->fontAs|cent = f|
|00003220| 2e 61 73 63 65 6e 74 20 | 3b 0d 20 20 0d 20 20 2f |.ascent |;. . /|
|00003230| 2f 20 52 65 73 74 6f 72 | 65 20 70 72 65 76 69 6f |/ Restor|e previo|
|00003240| 75 73 20 67 72 61 66 50 | 6f 72 74 2e 0d 20 20 0d |us grafP|ort.. .|
|00003250| 20 20 53 65 74 50 6f 72 | 74 28 20 73 61 76 65 64 | SetPor|t( saved|
|00003260| 50 6f 72 74 20 29 3b 0d | 7d 0d 2f 2a 2a 2a 2a 2a |Port );.|}./*****|
|00003270| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003280| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003290| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000032a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000032b0| 2f 0d 0d 0d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/...----|--------|
|000032c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0d |--------|-------.|
|000032d0| 0d 3e 46 72 6f 6d 20 61 | 6e 74 40 6b 75 6e 69 6b |.>From a|nt@kunik|
|000032e0| 70 6f 6b 2e 69 63 75 73 | 2e 63 6f 6d 20 28 68 61 |pok.icus|.com (ha|
|000032f0| 6e 64 6c 65 29 0d 53 75 | 62 6a 65 63 74 3a 20 44 |ndle).Su|bject: D|
|00003300| 65 6c 65 74 69 6e 67 20 | 70 74 72 20 74 6f 20 62 |eleting |ptr to b|
|00003310| 61 73 65 20 6e 6f 74 20 | 63 61 6c 6c 69 6e 67 20 |ase not |calling |
|00003320| 64 74 6f 72 73 20 6f 66 | 20 64 65 72 69 76 65 64 |dtors of| derived|
|00003330| 0d 44 61 74 65 3a 20 57 | 65 64 2c 20 32 37 20 4a |.Date: W|ed, 27 J|
|00003340| 75 6c 20 39 34 20 30 34 | 3a 34 31 3a 30 37 20 43 |ul 94 04|:41:07 C|
|00003350| 44 54 0d 4f 72 67 61 6e | 69 7a 61 74 69 6f 6e 3a |DT.Organ|ization:|
|00003360| 20 4b 75 6e 69 6b 70 6f | 6b 20 4b 65 6e 6e 65 6c | Kunikpo|k Kennel|
|00003370| 73 20 61 6e 64 20 4b 6f | 6d 70 75 74 65 72 73 20 |s and Ko|mputers |
|00003380| 28 50 65 74 20 50 72 6f | 6a 65 63 74 29 0d 0d 49 |(Pet Pro|ject)..I|
|00003390| 27 6d 20 68 61 76 69 6e | 67 20 61 20 70 72 6f 62 |'m havin|g a prob|
|000033a0| 6c 65 6d 20 77 69 74 68 | 20 64 65 73 74 72 75 63 |lem with| destruc|
|000033b0| 74 6f 72 73 2e 20 49 74 | 20 70 6f 70 70 65 64 20 |tors. It| popped |
|000033c0| 75 70 20 69 6e 20 61 20 | 66 61 69 72 6c 79 20 6c |up in a |fairly l|
|000033d0| 61 72 67 65 0d 68 69 65 | 72 61 72 63 68 79 2c 20 |arge.hie|rarchy, |
|000033e0| 61 6e 64 20 49 27 76 65 | 20 62 6f 69 6c 65 64 20 |and I've| boiled |
|000033f0| 69 74 20 64 6f 77 6e 20 | 74 6f 20 74 68 65 20 73 |it down |to the s|
|00003400| 69 6d 70 6c 65 73 74 20 | 70 6f 73 73 69 62 6c 65 |implest |possible|
|00003410| 20 62 65 6c 6f 77 2e 20 | 49 66 0d 49 20 63 61 6c | below. |If.I cal|
|00003420| 6c 20 61 20 66 75 6e 63 | 74 69 6f 6e 20 77 68 69 |l a func|tion whi|
|00003430| 63 68 20 61 63 63 65 70 | 74 73 20 61 20 70 6f 69 |ch accep|ts a poi|
|00003440| 6e 74 65 72 20 74 6f 20 | 42 61 73 65 2c 20 62 75 |nter to |Base, bu|
|00003450| 74 20 74 68 65 20 70 6f | 69 6e 74 65 72 20 69 73 |t the po|inter is|
|00003460| 0d 6f 66 20 63 6c 61 73 | 73 20 44 65 72 69 76 65 |.of clas|s Derive|
|00003470| 64 2c 20 77 68 65 6e 20 | 74 68 65 20 66 75 6e 63 |d, when |the func|
|00003480| 74 69 6f 6e 20 64 65 6c | 65 74 65 73 20 74 68 65 |tion del|etes the|
|00003490| 20 6f 62 6a 65 63 74 2c | 20 69 74 20 64 6f 65 73 | object,| it does|
|000034a0| 6e 27 74 0d 63 61 6c 6c | 20 44 65 72 69 76 65 64 |n't.call| Derived|
|000034b0| 27 73 20 64 65 73 74 72 | 75 63 74 6f 72 2e 20 49 |'s destr|uctor. I|
|000034c0| 66 20 49 20 61 64 64 20 | 61 20 64 65 73 74 72 75 |f I add |a destru|
|000034d0| 63 74 6f 72 20 74 6f 20 | 42 61 73 65 2c 20 74 68 |ctor to |Base, th|
|000034e0| 65 6e 20 69 74 0d 63 61 | 6c 6c 73 20 44 65 72 69 |en it.ca|lls Deri|
|000034f0| 76 65 64 27 73 20 64 65 | 73 74 72 75 63 74 6f 72 |ved's de|structor|
|00003500| 2c 20 74 68 65 6e 20 42 | 61 73 65 27 73 20 64 65 |, then B|ase's de|
|00003510| 73 74 72 75 63 74 6f 72 | 20 28 61 73 20 49 20 77 |structor| (as I w|
|00003520| 6f 75 6c 64 20 65 78 70 | 65 63 74 29 2e 0d 54 68 |ould exp|ect)..Th|
|00003530| 69 73 20 73 65 65 6d 73 | 20 6c 69 6b 65 20 69 6e |is seems| like in|
|00003540| 63 6f 6e 73 69 73 74 65 | 6e 74 20 62 65 68 61 76 |consiste|nt behav|
|00003550| 69 6f 75 72 2e 20 49 73 | 20 74 68 69 73 20 63 6f |iour. Is| this co|
|00003560| 72 72 65 63 74 20 43 2b | 2b 3f 20 49 20 6e 65 65 |rrect C+|+? I nee|
|00003570| 64 20 74 6f 0d 67 65 74 | 20 69 74 20 74 6f 20 63 |d to.get| it to c|
|00003580| 6f 72 72 65 63 74 6c 79 | 20 63 61 6c 6c 20 44 65 |orrectly| call De|
|00003590| 72 69 76 65 64 27 73 20 | 64 65 73 74 72 75 63 74 |rived's |destruct|
|000035a0| 6f 72 2e 20 49 20 64 6f | 6e 27 74 20 77 61 6e 74 |or. I do|n't want|
|000035b0| 20 74 6f 20 68 61 76 65 | 20 74 6f 0d 61 64 64 20 | to have| to.add |
|000035c0| 61 20 64 65 73 74 72 75 | 63 74 6f 72 20 74 6f 20 |a destru|ctor to |
|000035d0| 42 61 73 65 20 28 69 74 | 20 64 6f 65 73 6e 74 20 |Base (it| doesnt |
|000035e0| 6e 65 65 64 20 6f 6e 65 | 29 2e 20 49 66 20 79 6f |need one|). If yo|
|000035f0| 75 72 20 72 65 73 70 6f | 6e 73 65 20 69 73 0d 22 |ur respo|nse is."|
|00003600| 6a 75 73 74 20 61 64 64 | 20 6f 6e 65 20 61 6e 79 |just add| one any|
|00003610| 77 61 79 22 2c 20 49 20 | 6d 75 73 74 20 70 6f 69 |way", I |must poi|
|00003620| 6e 74 20 74 68 69 73 20 | 6f 75 74 3a 20 49 66 20 |nt this |out: If |
|00003630| 74 68 69 73 20 69 73 20 | 61 20 62 75 67 2c 20 74 |this is |a bug, t|
|00003640| 68 65 6e 0d 6c 65 74 27 | 73 20 66 69 6e 64 20 6f |hen.let'|s find o|
|00003650| 75 74 20 61 6c 6c 20 74 | 68 65 20 72 61 6d 69 66 |ut all t|he ramif|
|00003660| 69 63 61 74 69 6f 6e 73 | 2c 20 69 6e 73 74 65 61 |ications|, instea|
|00003670| 64 20 6f 66 20 6a 75 73 | 74 20 69 67 6e 6f 72 69 |d of jus|t ignori|
|00003680| 6e 67 20 69 74 2e 0d 20 | 0d 49 20 61 6d 20 75 73 |ng it.. |.I am us|
|00003690| 69 6e 67 20 28 68 6f 77 | 20 6f 6e 20 65 61 72 74 |ing (how| on eart|
|000036a0| 68 20 64 69 64 20 79 6f | 75 20 67 75 65 73 73 3f |h did yo|u guess?|
|000036b0| 3f 29 20 53 79 6d 61 6e | 74 65 63 20 43 2b 2b 20 |?) Syman|tec C++ |
|000036c0| 37 2e 30 2e 33 20 20 3a | 29 0d 20 0d 54 68 61 6e |7.0.3 :|). .Than|
|000036d0| 78 21 0d 20 0d 2d 20 2d | 2d 2d 20 74 65 73 74 2e |x!. .- -|-- test.|
|000036e0| 63 70 20 2d 2d 2d 2d 2d | 0d 20 0d 63 6c 61 73 73 |cp -----|. .class|
|000036f0| 20 42 61 73 65 20 7b 20 | 7d 3b 20 20 20 20 20 20 | Base { |}; |
|00003700| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2f 20 45 6d | | // Em|
|00003710| 70 74 79 20 62 61 73 65 | 20 63 6c 61 73 73 0d 20 |pty base| class. |
|00003720| 0d 63 6c 61 73 73 20 44 | 65 72 69 76 65 64 20 3a |.class D|erived :|
|00003730| 20 70 75 62 6c 69 63 20 | 42 61 73 65 20 20 20 20 | public |Base |
|00003740| 20 2f 2f 20 44 65 72 69 | 76 65 64 20 63 6c 61 73 | // Deri|ved clas|
|00003750| 73 2c 20 68 61 73 20 61 | 20 63 6f 6e 73 74 72 75 |s, has a| constru|
|00003760| 63 74 6f 72 0d 7b 20 20 | 20 20 20 20 20 20 20 20 |ctor.{ | |
|00003770| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003780| 20 20 20 20 20 2f 2f 20 | 61 6e 64 20 64 65 73 74 | // |and dest|
|00003790| 72 75 63 74 6f 72 0d 70 | 75 62 6c 69 63 3a 0d 20 |ructor.p|ublic:. |
|000037a0| 20 20 20 44 65 72 69 76 | 65 64 28 20 76 6f 69 64 | Deriv|ed( void|
|000037b0| 20 29 3b 0d 20 20 20 20 | 76 69 72 74 75 61 6c 20 | );. |virtual |
|000037c0| 7e 44 65 72 69 76 65 64 | 28 20 76 6f 69 64 20 29 |~Derived|( void )|
|000037d0| 3b 0d 20 20 20 20 63 68 | 61 72 2a 20 74 68 65 50 |;. ch|ar* theP|
|000037e0| 3b 0d 7d 3b 0d 20 0d 44 | 65 72 69 76 65 64 3a 3a |;.};. .D|erived::|
|000037f0| 44 65 72 69 76 65 64 28 | 20 76 6f 69 64 20 29 0d |Derived(| void ).|
|00003800| 7b 0d 20 20 20 20 74 68 | 65 50 20 3d 20 6e 65 77 |{. th|eP = new|
|00003810| 20 63 68 61 72 20 5b 32 | 30 30 30 30 5d 3b 20 20 | char [2|0000]; |
|00003820| 20 20 2f 2f 20 41 6c 6c | 6f 63 61 74 65 20 73 6f | // All|ocate so|
|00003830| 6d 65 20 73 70 61 63 65 | 0d 7d 0d 20 0d 44 65 72 |me space|.}. .Der|
|00003840| 69 76 65 64 3a 3a 7e 44 | 65 72 69 76 65 64 28 20 |ived::~D|erived( |
|00003850| 76 6f 69 64 20 29 0d 7b | 0d 20 20 20 20 69 66 20 |void ).{|. if |
|00003860| 28 20 74 68 65 50 20 21 | 3d 20 30 20 29 0d 20 20 |( theP !|= 0 ). |
|00003870| 20 20 20 20 20 20 64 65 | 6c 65 74 65 5b 5d 20 74 | de|lete[] t|
|00003880| 68 65 50 3b 20 20 20 20 | 20 20 20 20 20 20 2f 2f |heP; | //|
|00003890| 20 46 72 65 65 20 69 66 | 20 61 6c 6c 6f 63 61 74 | Free if| allocat|
|000038a0| 65 64 0d 7d 0d 20 0d 76 | 6f 69 64 20 20 20 20 44 |ed.}. .v|oid D|
|000038b0| 65 6c 65 74 65 44 65 72 | 69 76 65 64 28 20 44 65 |eleteDer|ived( De|
|000038c0| 72 69 76 65 64 2a 20 6f | 62 6a 20 29 0d 7b 0d 20 |rived* o|bj ).{. |
|000038d0| 20 20 20 64 65 6c 65 74 | 65 20 6f 62 6a 3b 20 20 | delet|e obj; |
|000038e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2f | | /|
|000038f0| 2f 20 44 65 6c 65 74 65 | 20 6f 62 6a 0d 7d 0d 20 |/ Delete| obj.}. |
|00003900| 0d 76 6f 69 64 20 20 20 | 20 44 65 6c 65 74 65 42 |.void | DeleteB|
|00003910| 61 73 65 28 20 42 61 73 | 65 2a 20 6f 62 6a 20 29 |ase( Bas|e* obj )|
|00003920| 0d 7b 0d 20 20 20 20 64 | 65 6c 65 74 65 20 6f 62 |.{. d|elete ob|
|00003930| 6a 3b 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |j; | |
|00003940| 20 20 20 2f 2f 20 44 65 | 6c 65 74 65 20 6f 62 6a | // De|lete obj|
|00003950| 0d 7d 0d 20 0d 6d 61 69 | 6e 28 29 0d 7b 0d 20 20 |.}. .mai|n().{. |
|00003960| 20 20 44 65 72 69 76 65 | 64 2a 20 20 20 20 62 31 | Derive|d* b1|
|00003970| 20 3d 20 6e 65 77 20 44 | 65 72 69 76 65 64 3b 0d | = new D|erived;.|
|00003980| 20 20 20 20 44 65 72 69 | 76 65 64 2a 20 20 20 20 | Deri|ved* |
|00003990| 62 32 20 3d 20 6e 65 77 | 20 44 65 72 69 76 65 64 |b2 = new| Derived|
|000039a0| 3b 0d 20 20 20 20 0d 20 | 20 20 20 44 65 6c 65 74 |;. . | Delet|
|000039b0| 65 44 65 72 69 76 65 64 | 28 20 62 31 20 29 3b 20 |eDerived|( b1 ); |
|000039c0| 20 20 20 20 20 20 20 2f | 2f 20 43 6f 72 72 65 63 | /|/ Correc|
|000039d0| 74 6c 79 20 63 61 6c 6c | 73 20 7e 44 65 72 69 76 |tly call|s ~Deriv|
|000039e0| 65 64 28 29 2e 0d 20 20 | 20 20 44 65 6c 65 74 65 |ed().. | Delete|
|000039f0| 42 61 73 65 28 20 62 32 | 20 29 3b 20 20 20 20 20 |Base( b2| ); |
|00003a00| 20 20 20 20 20 20 2f 2f | 20 43 61 6c 6c 73 20 2a | //| Calls *|
|00003a10| 6e 6f 2a 20 64 65 73 74 | 72 75 63 74 6f 72 73 0d |no* dest|ructors.|
|00003a20| 20 20 20 20 0d 20 20 20 | 20 72 65 74 75 72 6e 20 | . | return |
|00003a30| 30 3b 0d 7d 0d 20 0d 2d | 20 2d 2d 2d 20 65 6e 64 |0;.}. .-| --- end|
|00003a40| 20 6f 66 20 74 65 73 74 | 2e 63 70 20 2d 2d 2d 2d | of test|.cp ----|
|00003a50| 2d 0d 20 0d 2d 20 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |-. .- --|--------|
|00003a60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a90| 2d 2d 2d 2d 2d 2d 2d 2d | 0d 43 68 65 6c 6c 79 20 |--------|.Chelly |
|00003aa0| 47 72 65 65 6e 20 27 41 | 6e 74 27 20 20 20 20 20 |Green 'A|nt' |
|00003ab0| 20 20 20 20 20 3c 63 67 | 72 65 65 6e 25 70 6f 64 | <cg|reen%pod|
|00003ac0| 62 6f 78 2e 75 75 63 70 | 40 63 73 2e 75 74 65 78 |box.uucp|@cs.utex|
|00003ad0| 61 73 2e 65 64 75 3e 0d | 0d 2b 2b 2b 2b 2b 2b 2b |as.edu>.|.+++++++|
|00003ae0| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00003af0| 2b 2b 2b 2b 0d 0d 3e 46 | 72 6f 6d 20 6e 65 65 72 |++++..>F|rom neer|
|00003b00| 69 40 69 69 73 2e 65 65 | 2e 65 74 68 7a 2e 63 68 |i@iis.ee|.ethz.ch|
|00003b10| 20 28 4d 61 74 74 68 69 | 61 73 20 4e 65 65 72 61 | (Matthi|as Neera|
|00003b20| 63 68 65 72 29 0d 44 61 | 74 65 3a 20 32 38 20 4a |cher).Da|te: 28 J|
|00003b30| 75 6c 20 31 39 39 34 20 | 31 35 3a 35 33 3a 30 39 |ul 1994 |15:53:09|
|00003b40| 20 47 4d 54 0d 4f 72 67 | 61 6e 69 7a 61 74 69 6f | GMT.Org|anizatio|
|00003b50| 6e 3a 20 49 6e 74 65 67 | 72 61 74 65 64 20 53 79 |n: Integ|rated Sy|
|00003b60| 73 74 65 6d 73 20 4c 61 | 62 6f 72 61 74 6f 72 79 |stems La|boratory|
|00003b70| 2c 20 45 54 48 2c 20 5a | 75 72 69 63 68 0d 0d 49 |, ETH, Z|urich..I|
|00003b80| 6e 20 61 72 74 69 63 6c | 65 20 3c 39 71 39 34 50 |n articl|e <9q94P|
|00003b90| 63 32 77 31 36 35 77 40 | 6b 75 6e 69 6b 70 6f 6b |c2w165w@|kunikpok|
|00003ba0| 2e 69 63 75 73 2e 63 6f | 6d 3e 20 61 6e 74 40 6b |.icus.co|m> ant@k|
|00003bb0| 75 6e 69 6b 70 6f 6b 2e | 69 63 75 73 2e 63 6f 6d |unikpok.|icus.com|
|00003bc0| 20 28 68 61 6e 64 6c 65 | 29 20 77 72 69 74 65 73 | (handle|) writes|
|00003bd0| 3a 0d 3e 20 49 27 6d 20 | 68 61 76 69 6e 67 20 61 |:.> I'm |having a|
|00003be0| 20 70 72 6f 62 6c 65 6d | 20 77 69 74 68 20 64 65 | problem| with de|
|00003bf0| 73 74 72 75 63 74 6f 72 | 73 2e 20 49 74 20 70 6f |structor|s. It po|
|00003c00| 70 70 65 64 20 75 70 20 | 69 6e 20 61 20 66 61 69 |pped up |in a fai|
|00003c10| 72 6c 79 20 6c 61 72 67 | 65 0d 3e 20 68 69 65 72 |rly larg|e.> hier|
|00003c20| 61 72 63 68 79 2c 20 61 | 6e 64 20 49 27 76 65 20 |archy, a|nd I've |
|00003c30| 62 6f 69 6c 65 64 20 69 | 74 20 64 6f 77 6e 20 74 |boiled i|t down t|
|00003c40| 6f 20 74 68 65 20 73 69 | 6d 70 6c 65 73 74 20 70 |o the si|mplest p|
|00003c50| 6f 73 73 69 62 6c 65 20 | 62 65 6c 6f 77 2e 20 49 |ossible |below. I|
|00003c60| 66 0d 3e 20 49 20 63 61 | 6c 6c 20 61 20 66 75 6e |f.> I ca|ll a fun|
|00003c70| 63 74 69 6f 6e 20 77 68 | 69 63 68 20 61 63 63 65 |ction wh|ich acce|
|00003c80| 70 74 73 20 61 20 70 6f | 69 6e 74 65 72 20 74 6f |pts a po|inter to|
|00003c90| 20 42 61 73 65 2c 20 62 | 75 74 20 74 68 65 20 70 | Base, b|ut the p|
|00003ca0| 6f 69 6e 74 65 72 20 69 | 73 0d 3e 20 6f 66 20 63 |ointer i|s.> of c|
|00003cb0| 6c 61 73 73 20 44 65 72 | 69 76 65 64 2c 20 77 68 |lass Der|ived, wh|
|00003cc0| 65 6e 20 74 68 65 20 66 | 75 6e 63 74 69 6f 6e 20 |en the f|unction |
|00003cd0| 64 65 6c 65 74 65 73 20 | 74 68 65 20 6f 62 6a 65 |deletes |the obje|
|00003ce0| 63 74 2c 20 69 74 20 64 | 6f 65 73 6e 27 74 0d 3e |ct, it d|oesn't.>|
|00003cf0| 20 63 61 6c 6c 20 44 65 | 72 69 76 65 64 27 73 20 | call De|rived's |
|00003d00| 64 65 73 74 72 75 63 74 | 6f 72 2e 20 49 66 20 49 |destruct|or. If I|
|00003d10| 20 61 64 64 20 61 20 64 | 65 73 74 72 75 63 74 6f | add a d|estructo|
|00003d20| 72 20 74 6f 20 42 61 73 | 65 2c 20 74 68 65 6e 20 |r to Bas|e, then |
|00003d30| 69 74 0d 3e 20 63 61 6c | 6c 73 20 44 65 72 69 76 |it.> cal|ls Deriv|
|00003d40| 65 64 27 73 20 64 65 73 | 74 72 75 63 74 6f 72 2c |ed's des|tructor,|
|00003d50| 20 74 68 65 6e 20 42 61 | 73 65 27 73 20 64 65 73 | then Ba|se's des|
|00003d60| 74 72 75 63 74 6f 72 20 | 28 61 73 20 49 20 77 6f |tructor |(as I wo|
|00003d70| 75 6c 64 20 65 78 70 65 | 63 74 29 2e 0d 3e 20 54 |uld expe|ct)..> T|
|00003d80| 68 69 73 20 73 65 65 6d | 73 20 6c 69 6b 65 20 69 |his seem|s like i|
|00003d90| 6e 63 6f 6e 73 69 73 74 | 65 6e 74 20 62 65 68 61 |nconsist|ent beha|
|00003da0| 76 69 6f 75 72 2e 20 49 | 73 20 74 68 69 73 20 63 |viour. I|s this c|
|00003db0| 6f 72 72 65 63 74 20 43 | 2b 2b 3f 0d 0d 59 65 73 |orrect C|++?..Yes|
|00003dc0| 2e 0d 0d 3e 20 49 20 6e | 65 65 64 20 74 6f 20 67 |...> I n|eed to g|
|00003dd0| 65 74 20 69 74 20 74 6f | 20 63 6f 72 72 65 63 74 |et it to| correct|
|00003de0| 6c 79 20 63 61 6c 6c 20 | 44 65 72 69 76 65 64 27 |ly call |Derived'|
|00003df0| 73 20 64 65 73 74 72 75 | 63 74 6f 72 2e 20 49 20 |s destru|ctor. I |
|00003e00| 64 6f 6e 27 74 20 77 61 | 6e 74 20 74 6f 20 68 61 |don't wa|nt to ha|
|00003e10| 76 65 0d 3e 20 74 6f 20 | 61 64 64 20 61 20 64 65 |ve.> to |add a de|
|00003e20| 73 74 72 75 63 74 6f 72 | 20 74 6f 20 42 61 73 65 |structor| to Base|
|00003e30| 20 28 69 74 20 64 6f 65 | 73 6e 74 20 6e 65 65 64 | (it doe|snt need|
|00003e40| 20 6f 6e 65 29 2e 0d 0d | 57 65 6c 6c 2c 20 49 27 | one)...|Well, I'|
|00003e50| 6c 6c 20 73 74 61 72 74 | 20 77 69 74 68 20 74 68 |ll start| with th|
|00003e60| 65 20 61 72 67 75 6d 65 | 6e 74 20 62 79 20 61 75 |e argume|nt by au|
|00003e70| 74 68 6f 72 69 74 79 3a | 0d 0d 54 6f 20 71 75 6f |thority:|..To quo|
|00003e80| 74 65 20 42 6a 61 72 6e | 65 20 53 74 72 6f 75 73 |te Bjarn|e Strous|
|00003e90| 74 72 75 70 2c 20 5f 54 | 68 65 20 43 2b 2b 20 50 |trup, _T|he C++ P|
|00003ea0| 72 6f 67 72 61 6d 6d 69 | 6e 67 20 4c 61 6e 67 75 |rogrammi|ng Langu|
|00003eb0| 61 67 65 5f 2c 20 32 6e | 64 20 65 64 69 74 69 6f |age_, 2n|d editio|
|00003ec0| 6e 3a 0d 23 20 49 6e 20 | 67 65 6e 65 72 61 6c 2c |n:.# In |general,|
|00003ed0| 20 69 74 20 69 73 20 77 | 69 73 65 20 74 6f 20 73 | it is w|ise to s|
|00003ee0| 75 70 70 6c 79 20 61 20 | 76 69 72 74 75 61 6c 20 |upply a |virtual |
|00003ef0| 64 65 73 74 72 75 63 74 | 6f 72 20 69 6e 20 61 6c |destruct|or in al|
|00003f00| 6c 20 63 6c 61 73 73 65 | 73 20 74 68 61 74 0d 23 |l classe|s that.#|
|00003f10| 20 61 63 74 20 61 73 20 | 61 20 62 61 73 65 20 63 | act as |a base c|
|00003f20| 6c 61 73 73 20 69 6e 20 | 74 68 65 20 73 65 6e 73 |lass in |the sens|
|00003f30| 65 20 74 68 61 74 20 6f | 62 6a 65 63 74 73 20 6f |e that o|bjects o|
|00003f40| 66 20 64 65 72 69 76 65 | 64 20 63 6c 61 73 73 65 |f derive|d classe|
|00003f50| 73 20 61 72 65 0d 23 20 | 6d 61 6e 69 70 75 6c 61 |s are.# |manipula|
|00003f60| 74 65 64 20 28 61 6e 64 | 20 70 6f 73 73 69 62 6c |ted (and| possibl|
|00003f70| 79 20 64 65 6c 65 74 65 | 64 29 20 74 68 72 6f 75 |y delete|d) throu|
|00003f80| 67 68 20 61 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |gh a poi|nter to |
|00003f90| 74 68 65 20 62 61 73 65 | 2e 20 54 68 69 73 20 69 |the base|. This i|
|00003fa0| 73 0d 23 20 61 6c 6d 6f | 73 74 20 61 6c 77 61 79 |s.# almo|st alway|
|00003fb0| 73 20 74 68 65 20 63 61 | 73 65 20 66 6f 72 20 63 |s the ca|se for c|
|00003fc0| 6c 61 73 73 65 73 20 77 | 69 74 68 20 65 76 65 6e |lasses w|ith even|
|00003fd0| 20 61 20 73 69 6e 67 6c | 65 20 76 69 72 74 75 61 | a singl|e virtua|
|00003fe0| 6c 20 66 75 6e 63 74 69 | 6f 6e 2e 0d 0d 49 66 20 |l functi|on...If |
|00003ff0| 74 68 61 74 20 64 6f 65 | 73 6e 27 74 20 63 6f 6e |that doe|sn't con|
|00004000| 76 69 6e 63 65 20 79 6f | 75 2c 20 74 68 69 6e 6b |vince yo|u, think|
|00004010| 20 61 62 6f 75 74 20 69 | 74 20 69 6e 20 74 65 63 | about i|t in tec|
|00004020| 68 6e 69 63 61 6c 20 74 | 65 72 6d 73 3a 20 48 6f |hnical t|erms: Ho|
|00004030| 77 20 69 73 0d 74 68 65 | 20 63 6f 6d 70 69 6c 65 |w is.the| compile|
|00004040| 72 20 74 6f 20 6b 6e 6f | 77 20 74 6f 20 63 61 6c |r to kno|w to cal|
|00004050| 6c 20 61 20 64 65 73 74 | 72 75 63 74 6f 72 20 6f |l a dest|ructor o|
|00004060| 66 20 74 68 65 20 64 65 | 72 69 76 65 64 20 63 6c |f the de|rived cl|
|00004070| 61 73 73 20 6f 6e 20 61 | 0d 0d 64 65 6c 65 74 65 |ass on a|..delete|
|00004080| 20 62 61 73 65 3b 0d 0d | 73 74 61 74 65 6d 65 6e | base;..|statemen|
|00004090| 74 2c 20 75 6e 6c 65 73 | 73 20 74 68 65 20 62 61 |t, unles|s the ba|
|000040a0| 73 65 20 63 6c 61 73 73 | 20 70 72 6f 76 69 64 65 |se class| provide|
|000040b0| 73 20 61 20 68 69 6e 74 | 20 69 6e 20 74 68 65 20 |s a hint| in the |
|000040c0| 66 6f 72 6d 20 6f 66 20 | 61 20 76 69 72 74 75 61 |form of |a virtua|
|000040d0| 6c 0d 64 65 73 74 72 75 | 63 74 6f 72 2e 0d 0d 3e |l.destru|ctor...>|
|000040e0| 49 66 20 79 6f 75 72 20 | 72 65 73 70 6f 6e 73 65 |If your |response|
|000040f0| 20 69 73 20 22 6a 75 73 | 74 0d 3e 20 61 64 64 20 | is "jus|t.> add |
|00004100| 6f 6e 65 20 61 6e 79 77 | 61 79 22 2c 20 49 20 6d |one anyw|ay", I m|
|00004110| 75 73 74 20 70 6f 69 6e | 74 20 74 68 69 73 20 6f |ust poin|t this o|
|00004120| 75 74 3a 20 49 66 20 74 | 68 69 73 20 69 73 20 61 |ut: If t|his is a|
|00004130| 20 62 75 67 2c 20 74 68 | 65 6e 20 6c 65 74 27 73 | bug, th|en let's|
|00004140| 20 66 69 6e 64 20 6f 75 | 74 0d 3e 20 61 6c 6c 20 | find ou|t.> all |
|00004150| 74 68 65 20 72 61 6d 69 | 66 69 63 61 74 69 6f 6e |the rami|fication|
|00004160| 73 2c 20 69 6e 73 74 65 | 61 64 20 6f 66 20 6a 75 |s, inste|ad of ju|
|00004170| 73 74 20 69 67 6e 6f 72 | 69 6e 67 20 69 74 2e 0d |st ignor|ing it..|
|00004180| 0d 59 6f 75 72 20 61 74 | 74 69 74 75 64 65 20 69 |.Your at|titude i|
|00004190| 73 20 63 6f 72 72 65 63 | 74 2c 20 62 75 74 20 69 |s correc|t, but i|
|000041a0| 74 27 73 20 6e 6f 74 20 | 61 20 62 75 67 2e 0d 0d |t's not |a bug...|
|000041b0| 3e 20 49 20 61 6d 20 75 | 73 69 6e 67 20 28 68 6f |> I am u|sing (ho|
|000041c0| 77 20 6f 6e 20 65 61 72 | 74 68 20 64 69 64 20 79 |w on ear|th did y|
|000041d0| 6f 75 20 67 75 65 73 73 | 3f 3f 29 20 53 79 6d 61 |ou guess|??) Syma|
|000041e0| 6e 74 65 63 20 43 2b 2b | 20 37 2e 30 2e 33 20 20 |ntec C++| 7.0.3 |
|000041f0| 3a 29 0d 20 0d 41 77 77 | 77 2c 20 6c 65 61 76 65 |:). .Aww|w, leave|
|00004200| 20 74 68 6f 73 65 20 70 | 6f 6f 72 20 53 79 6d 61 | those p|oor Syma|
|00004210| 6e 74 65 63 20 63 6f 6d | 70 69 6c 65 72 20 67 75 |ntec com|piler gu|
|00004220| 79 73 20 61 6c 6f 6e 65 | 20 66 6f 72 20 61 20 63 |ys alone| for a c|
|00004230| 68 61 6e 67 65 20 61 6e | 64 20 6c 65 74 20 74 68 |hange an|d let th|
|00004240| 65 6d 0d 66 69 78 20 74 | 68 65 20 62 75 67 73 20 |em.fix t|he bugs |
|00004250| 74 68 61 74 20 2a 61 72 | 65 2a 20 74 68 65 72 65 |that *ar|e* there|
|00004260| 20 28 41 73 20 74 68 65 | 20 22 2a 3d 22 20 74 68 | (As the| "*=" th|
|00004270| 72 65 61 64 20 68 61 73 | 20 73 68 6f 77 6e 2c 20 |read has| shown, |
|00004280| 69 74 20 69 73 20 68 61 | 72 64 20 65 6e 6f 75 67 |it is ha|rd enoug|
|00004290| 68 0d 74 6f 20 63 6f 6e | 76 69 6e 63 65 20 74 68 |h.to con|vince th|
|000042a0| 65 6d 20 6f 66 20 74 68 | 6f 73 65 20 61 6c 72 65 |em of th|ose alre|
|000042b0| 61 64 79 2e 20 54 68 65 | 20 4d 65 74 72 6f 77 65 |ady. The| Metrowe|
|000042c0| 72 6b 73 20 67 75 79 73 | 2c 20 6f 6e 20 74 68 65 |rks guys|, on the|
|000042d0| 20 6f 74 68 65 72 20 68 | 61 6e 64 2c 0d 64 69 64 | other h|and,.did|
|000042e0| 6e 27 74 20 65 78 70 6c | 69 63 69 74 65 6c 79 20 |n't expl|icitely |
|000042f0| 61 64 6d 69 74 20 74 68 | 61 74 20 69 74 20 77 61 |admit th|at it wa|
|00004300| 73 20 61 20 62 75 67 2c | 20 62 75 74 20 70 72 6f |s a bug,| but pro|
|00004310| 6d 69 73 65 64 20 74 6f | 20 66 69 78 20 69 74 20 |mised to| fix it |
|00004320| 3a 2d 29 2e 0d 0d 4d 61 | 74 74 68 69 61 73 0d 0d |:-)...Ma|tthias..|
|00004330| 2d 20 2d 2d 2d 0d 4d 61 | 74 74 68 69 61 73 20 4e |- ---.Ma|tthias N|
|00004340| 65 65 72 61 63 68 65 72 | 20 3c 6e 65 65 72 69 40 |eeracher| <neeri@|
|00004350| 69 69 73 2e 65 65 2e 65 | 74 68 7a 2e 63 68 3e 20 |iis.ee.e|thz.ch> |
|00004360| 68 74 74 70 3a 2f 2f 65 | 72 72 2e 65 74 68 7a 2e |http://e|rr.ethz.|
|00004370| 63 68 2f 6d 65 6d 62 65 | 72 73 2f 6e 65 65 72 69 |ch/membe|rs/neeri|
|00004380| 2e 68 74 6d 6c 0d 20 20 | 22 50 61 72 61 6e 6f 74 |.html. |"Paranot|
|00004390| 69 6f 6e 73 2c 20 77 68 | 69 63 68 20 64 65 73 69 |ions, wh|ich desi|
|000043a0| 67 6e 61 74 65 20 63 6f | 6e 73 74 72 75 63 74 73 |gnate co|nstructs|
|000043b0| 2c 20 6d 61 79 20 6e 6f | 77 20 63 6f 6e 74 61 69 |, may no|w contai|
|000043c0| 6e 20 6d 65 74 61 6e 6f | 74 69 6f 6e 73 20 61 6e |n metano|tions an|
|000043d0| 64 0d 20 20 20 60 60 68 | 79 70 65 72 6e 6f 74 69 |d. ``h|ypernoti|
|000043e0| 6f 6e 73 27 27 20 68 61 | 76 65 20 62 65 65 6e 20 |ons'' ha|ve been |
|000043f0| 69 6e 74 72 6f 64 75 63 | 65 64 20 69 6e 20 6f 72 |introduc|ed in or|
|00004400| 64 65 72 20 74 6f 20 64 | 65 73 69 67 6e 61 74 65 |der to d|esignate|
|00004410| 20 70 72 6f 74 6f 6e 6f | 74 69 6f 6e 73 22 0d 20 | protono|tions". |
|00004420| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2d | | -|
|00004430| 2d 20 41 2e 20 76 61 6e | 20 57 69 6a 6e 67 61 61 |- A. van| Wijngaa|
|00004440| 72 64 65 6e 20 65 74 20 | 61 6c 2e 2c 20 5f 41 4c |rden et |al., _AL|
|00004450| 47 4f 4c 20 36 38 20 52 | 65 76 69 73 65 64 20 52 |GOL 68 R|evised R|
|00004460| 65 70 6f 72 74 5f 0d 0d | 2b 2b 2b 2b 2b 2b 2b 2b |eport_..|++++++++|
|00004470| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00004480| 2b 2b 2b 0d 0d 3e 46 72 | 6f 6d 20 6e 61 67 6c 65 |+++..>Fr|om nagle|
|00004490| 40 6e 65 74 63 6f 6d 2e | 63 6f 6d 20 28 4a 6f 68 |@netcom.|com (Joh|
|000044a0| 6e 20 4e 61 67 6c 65 29 | 0d 44 61 74 65 3a 20 46 |n Nagle)|.Date: F|
|000044b0| 72 69 2c 20 32 39 20 4a | 75 6c 20 31 39 39 34 20 |ri, 29 J|ul 1994 |
|000044c0| 30 34 3a 30 38 3a 32 38 | 20 47 4d 54 0d 4f 72 67 |04:08:28| GMT.Org|
|000044d0| 61 6e 69 7a 61 74 69 6f | 6e 3a 20 4e 45 54 43 4f |anizatio|n: NETCO|
|000044e0| 4d 20 4f 6e 2d 6c 69 6e | 65 20 43 6f 6d 6d 75 6e |M On-lin|e Commun|
|000044f0| 69 63 61 74 69 6f 6e 20 | 53 65 72 76 69 63 65 73 |ication |Services|
|00004500| 20 28 34 30 38 20 32 36 | 31 2d 34 37 30 30 20 67 | (408 26|1-4700 g|
|00004510| 75 65 73 74 29 0d 0d 6e | 65 65 72 69 40 69 69 73 |uest)..n|eeri@iis|
|00004520| 2e 65 65 2e 65 74 68 7a | 2e 63 68 20 28 4d 61 74 |.ee.ethz|.ch (Mat|
|00004530| 74 68 69 61 73 20 4e 65 | 65 72 61 63 68 65 72 29 |thias Ne|eracher)|
|00004540| 20 77 72 69 74 65 73 3a | 0d 3e 49 6e 20 61 72 74 | writes:|.>In art|
|00004550| 69 63 6c 65 20 3c 39 71 | 39 34 50 63 32 77 31 36 |icle <9q|94Pc2w16|
|00004560| 35 77 40 6b 75 6e 69 6b | 70 6f 6b 2e 69 63 75 73 |5w@kunik|pok.icus|
|00004570| 2e 63 6f 6d 3e 20 61 6e | 74 40 6b 75 6e 69 6b 70 |.com> an|t@kunikp|
|00004580| 6f 6b 2e 69 63 75 73 2e | 63 6f 6d 20 28 68 61 6e |ok.icus.|com (han|
|00004590| 64 6c 65 29 20 77 72 69 | 74 65 73 3a 0d 3e 3e 20 |dle) wri|tes:.>> |
|000045a0| 49 27 6d 20 68 61 76 69 | 6e 67 20 61 20 70 72 6f |I'm havi|ng a pro|
|000045b0| 62 6c 65 6d 20 77 69 74 | 68 20 64 65 73 74 72 75 |blem wit|h destru|
|000045c0| 63 74 6f 72 73 2e 20 49 | 74 20 70 6f 70 70 65 64 |ctors. I|t popped|
|000045d0| 20 75 70 20 69 6e 20 61 | 20 66 61 69 72 6c 79 20 | up in a| fairly |
|000045e0| 6c 61 72 67 65 0d 3e 3e | 20 68 69 65 72 61 72 63 |large.>>| hierarc|
|000045f0| 68 79 2c 20 61 6e 64 20 | 49 27 76 65 20 62 6f 69 |hy, and |I've boi|
|00004600| 6c 65 64 20 69 74 20 64 | 6f 77 6e 20 74 6f 20 74 |led it d|own to t|
|00004610| 68 65 20 73 69 6d 70 6c | 65 73 74 20 70 6f 73 73 |he simpl|est poss|
|00004620| 69 62 6c 65 20 62 65 6c | 6f 77 2e 20 49 66 0d 3e |ible bel|ow. If.>|
|00004630| 3e 20 49 20 63 61 6c 6c | 20 61 20 66 75 6e 63 74 |> I call| a funct|
|00004640| 69 6f 6e 20 77 68 69 63 | 68 20 61 63 63 65 70 74 |ion whic|h accept|
|00004650| 73 20 61 20 70 6f 69 6e | 74 65 72 20 74 6f 20 42 |s a poin|ter to B|
|00004660| 61 73 65 2c 20 62 75 74 | 20 74 68 65 20 70 6f 69 |ase, but| the poi|
|00004670| 6e 74 65 72 20 69 73 0d | 3e 3e 20 6f 66 20 63 6c |nter is.|>> of cl|
|00004680| 61 73 73 20 44 65 72 69 | 76 65 64 2c 20 77 68 65 |ass Deri|ved, whe|
|00004690| 6e 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 64 |n the fu|nction d|
|000046a0| 65 6c 65 74 65 73 20 74 | 68 65 20 6f 62 6a 65 63 |eletes t|he objec|
|000046b0| 74 2c 20 69 74 20 64 6f | 65 73 6e 27 74 0d 3e 3e |t, it do|esn't.>>|
|000046c0| 20 63 61 6c 6c 20 44 65 | 72 69 76 65 64 27 73 20 | call De|rived's |
|000046d0| 64 65 73 74 72 75 63 74 | 6f 72 2e 20 49 66 20 49 |destruct|or. If I|
|000046e0| 20 61 64 64 20 61 20 64 | 65 73 74 72 75 63 74 6f | add a d|estructo|
|000046f0| 72 20 74 6f 20 42 61 73 | 65 2c 20 74 68 65 6e 20 |r to Bas|e, then |
|00004700| 69 74 0d 3e 3e 20 63 61 | 6c 6c 73 20 44 65 72 69 |it.>> ca|lls Deri|
|00004710| 76 65 64 27 73 20 64 65 | 73 74 72 75 63 74 6f 72 |ved's de|structor|
|00004720| 2c 20 74 68 65 6e 20 42 | 61 73 65 27 73 20 64 65 |, then B|ase's de|
|00004730| 73 74 72 75 63 74 6f 72 | 20 28 61 73 20 49 20 77 |structor| (as I w|
|00004740| 6f 75 6c 64 20 65 78 70 | 65 63 74 29 2e 0d 3e 3e |ould exp|ect)..>>|
|00004750| 20 54 68 69 73 20 73 65 | 65 6d 73 20 6c 69 6b 65 | This se|ems like|
|00004760| 20 69 6e 63 6f 6e 73 69 | 73 74 65 6e 74 20 62 65 | inconsi|stent be|
|00004770| 68 61 76 69 6f 75 72 2e | 20 49 73 20 74 68 69 73 |haviour.| Is this|
|00004780| 20 63 6f 72 72 65 63 74 | 20 43 2b 2b 3f 0d 0d 3e | correct| C++?..>|
|00004790| 59 65 73 2e 0d 0d 20 20 | 20 20 20 54 68 61 74 27 |Yes... | That'|
|000047a0| 73 20 72 69 67 68 74 2c | 20 62 75 74 20 74 68 65 |s right,| but the|
|000047b0| 20 72 61 74 69 6f 6e 61 | 6c 65 20 66 6f 72 20 69 | rationa|le for i|
|000047c0| 74 20 77 6f 72 6b 69 6e | 67 20 74 68 69 73 20 77 |t workin|g this w|
|000047d0| 61 79 20 69 73 20 77 69 | 65 72 64 2e 0d 0d 20 20 |ay is wi|erd... |
|000047e0| 20 20 20 54 68 65 20 74 | 72 6f 75 62 6c 65 20 63 | The t|rouble c|
|000047f0| 6f 6d 65 73 20 66 72 6f | 6d 20 74 68 65 20 43 2b |omes fro|m the C+|
|00004800| 2b 20 64 65 73 69 67 6e | 20 64 65 63 69 73 69 6f |+ design| decisio|
|00004810| 6e 20 74 68 61 74 20 63 | 6c 61 73 73 65 73 20 61 |n that c|lasses a|
|00004820| 6e 64 0d 73 74 72 75 63 | 74 73 20 61 72 65 20 74 |nd.struc|ts are t|
|00004830| 68 65 20 73 61 6d 65 2c | 20 70 6c 75 73 20 74 68 |he same,| plus th|
|00004840| 65 20 64 65 73 69 67 6e | 20 64 65 63 69 73 69 6f |e design| decisio|
|00004850| 6e 20 74 68 61 74 20 63 | 6c 61 73 73 65 73 20 74 |n that c|lasses t|
|00004860| 68 61 74 20 64 6f 6e 27 | 74 0d 75 73 65 20 22 43 |hat don'|t.use "C|
|00004870| 2b 2b 20 66 65 61 74 75 | 72 65 73 22 20 68 61 76 |++ featu|res" hav|
|00004880| 65 20 63 6f 6d 70 61 74 | 69 62 6c 65 20 73 74 6f |e compat|ible sto|
|00004890| 72 61 67 65 20 6c 61 79 | 6f 75 74 20 77 69 74 68 |rage lay|out with|
|000048a0| 20 43 20 73 74 72 75 63 | 74 73 2e 0d 20 4c 6f 67 | C struc|ts.. Log|
|000048b0| 69 63 61 6c 6c 79 2c 20 | 61 6c 6c 20 64 65 73 74 |ically, |all dest|
|000048c0| 72 75 63 74 6f 72 73 20 | 73 68 6f 75 6c 64 20 62 |ructors |should b|
|000048d0| 65 20 76 69 72 74 75 61 | 6c 2c 20 62 75 74 20 74 |e virtua|l, but t|
|000048e0| 68 61 74 20 77 6f 75 6c | 64 20 66 6f 72 63 65 0d |hat woul|d force.|
|000048f0| 61 6c 6c 20 63 6c 61 73 | 73 65 73 20 74 6f 20 68 |all clas|ses to h|
|00004900| 61 76 65 20 74 68 65 20 | 6d 61 63 68 69 6e 65 72 |ave the |machiner|
|00004910| 79 20 66 6f 72 20 76 69 | 72 74 75 61 6c 20 66 75 |y for vi|rtual fu|
|00004920| 6e 63 74 69 6f 6e 73 2c | 20 69 6e 20 63 61 73 65 |nctions,| in case|
|00004930| 20 73 6f 6d 65 62 6f 64 | 79 0d 6c 61 74 65 72 20 | somebod|y.later |
|00004940| 64 65 72 69 76 65 64 20 | 61 20 63 6c 61 73 73 20 |derived |a class |
|00004950| 66 72 6f 6d 20 74 68 61 | 74 20 63 6c 61 73 73 2e |from tha|t class.|
|00004960| 20 20 54 68 69 73 20 77 | 6f 75 6c 64 20 62 72 65 | This w|ould bre|
|00004970| 61 6b 20 43 20 64 61 74 | 61 20 73 74 72 75 63 74 |ak C dat|a struct|
|00004980| 75 72 65 0d 63 6f 6d 70 | 61 74 69 62 69 6c 69 74 |ure.comp|atibilit|
|00004990| 79 2e 0d 0d 20 20 20 20 | 20 49 74 20 72 65 61 6c |y... | It real|
|000049a0| 6c 79 20 73 68 6f 75 6c | 64 20 62 65 20 61 6e 20 |ly shoul|d be an |
|000049b0| 65 72 72 6f 72 20 74 6f | 20 64 65 72 69 76 65 20 |error to| derive |
|000049c0| 61 20 63 6c 61 73 73 20 | 77 69 74 68 20 61 20 64 |a class |with a d|
|000049d0| 65 73 74 72 75 63 74 6f | 72 0d 66 72 6f 6d 20 61 |estructo|r.from a|
|000049e0| 20 63 6c 61 73 73 20 77 | 68 69 63 68 20 64 6f 65 | class w|hich doe|
|000049f0| 73 20 6e 6f 74 20 68 61 | 76 65 20 61 20 76 69 72 |s not ha|ve a vir|
|00004a00| 74 75 61 6c 20 64 65 73 | 74 72 75 63 74 6f 72 2e |tual des|tructor.|
|00004a10| 20 20 49 66 20 79 6f 75 | 20 77 61 6e 74 0d 6e 6f | If you| want.no|
|00004a20| 72 6d 61 6c 20 64 65 73 | 74 72 75 63 74 6f 72 20 |rmal des|tructor |
|00004a30| 73 65 6d 61 6e 74 69 63 | 73 2c 20 79 6f 75 20 68 |semantic|s, you h|
|00004a40| 61 76 65 20 74 6f 20 68 | 61 76 65 20 76 69 72 74 |ave to h|ave virt|
|00004a50| 75 61 6c 20 64 65 73 74 | 72 75 63 74 6f 72 73 20 |ual dest|ructors |
|00004a60| 61 6c 6c 20 74 68 65 20 | 77 61 79 0d 64 6f 77 6e |all the |way.down|
|00004a70| 20 74 6f 20 74 68 65 20 | 62 61 73 65 20 63 6c 61 | to the |base cla|
|00004a80| 73 73 2e 20 20 54 68 69 | 73 20 69 73 20 65 61 73 |ss. Thi|s is eas|
|00004a90| 69 6c 79 20 63 68 65 63 | 6b 61 62 6c 65 20 61 6e |ily chec|kable an|
|00004aa0| 64 20 73 68 6f 75 6c 64 | 20 62 65 0d 63 68 65 63 |d should| be.chec|
|00004ab0| 6b 65 64 2c 20 72 61 74 | 68 65 72 20 74 68 61 6e |ked, rat|her than|
|00004ac0| 20 62 65 69 6e 67 20 76 | 69 65 77 65 64 20 61 73 | being v|iewed as|
|00004ad0| 20 61 20 72 69 74 65 20 | 6f 66 20 70 61 73 73 61 | a rite |of passa|
|00004ae0| 67 65 20 66 6f 72 20 43 | 2b 2b 20 70 72 6f 67 72 |ge for C|++ progr|
|00004af0| 61 6d 6d 65 72 73 2e 0d | 0d 09 09 09 09 09 4a 6f |ammers..|......Jo|
|00004b00| 68 6e 20 4e 61 67 6c 65 | 0d 0d 2b 2b 2b 2b 2b 2b |hn Nagle|..++++++|
|00004b10| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00004b20| 2b 2b 2b 2b 2b 0d 0d 3e | 46 72 6f 6d 20 73 6f 6b |+++++..>|From sok|
|00004b30| 6f 6c 6f 66 66 40 6d 76 | 2e 6d 76 2e 63 6f 6d 20 |oloff@mv|.mv.com |
|00004b40| 28 4a 69 6d 20 53 6f 6b | 6f 6c 6f 66 66 29 0d 44 |(Jim Sok|oloff).D|
|00004b50| 61 74 65 3a 20 54 68 75 | 2c 20 32 38 20 4a 75 6c |ate: Thu|, 28 Jul|
|00004b60| 20 31 39 39 34 20 32 30 | 3a 30 34 3a 32 34 20 47 | 1994 20|:04:24 G|
|00004b70| 4d 54 0d 4f 72 67 61 6e | 69 7a 61 74 69 6f 6e 3a |MT.Organ|ization:|
|00004b80| 20 4d 56 20 43 6f 6d 6d | 75 6e 69 63 61 74 69 6f | MV Comm|unicatio|
|00004b90| 6e 73 2c 20 49 6e 63 2e | 0d 0d 49 6e 20 61 72 74 |ns, Inc.|..In art|
|00004ba0| 69 63 6c 65 20 3c 39 71 | 39 34 50 63 32 77 31 36 |icle <9q|94Pc2w16|
|00004bb0| 35 77 40 6b 75 6e 69 6b | 70 6f 6b 2e 69 63 75 73 |5w@kunik|pok.icus|
|00004bc0| 2e 63 6f 6d 3e 2c 0d 68 | 61 6e 64 6c 65 20 3c 61 |.com>,.h|andle <a|
|00004bd0| 6e 74 40 6b 75 6e 69 6b | 70 6f 6b 2e 69 63 75 73 |nt@kunik|pok.icus|
|00004be0| 2e 63 6f 6d 3e 20 77 72 | 6f 74 65 3a 0d 3e 49 27 |.com> wr|ote:.>I'|
|00004bf0| 6d 20 68 61 76 69 6e 67 | 20 61 20 70 72 6f 62 6c |m having| a probl|
|00004c00| 65 6d 20 77 69 74 68 20 | 64 65 73 74 72 75 63 74 |em with |destruct|
|00004c10| 6f 72 73 2e 20 49 74 20 | 70 6f 70 70 65 64 20 75 |ors. It |popped u|
|00004c20| 70 20 69 6e 20 61 20 66 | 61 69 72 6c 79 20 6c 61 |p in a f|airly la|
|00004c30| 72 67 65 0d 3e 68 69 65 | 72 61 72 63 68 79 2c 20 |rge.>hie|rarchy, |
|00004c40| 61 6e 64 20 49 27 76 65 | 20 62 6f 69 6c 65 64 20 |and I've| boiled |
|00004c50| 69 74 20 64 6f 77 6e 20 | 74 6f 20 74 68 65 20 73 |it down |to the s|
|00004c60| 69 6d 70 6c 65 73 74 20 | 70 6f 73 73 69 62 6c 65 |implest |possible|
|00004c70| 20 62 65 6c 6f 77 2e 20 | 49 66 0d 3e 49 20 63 61 | below. |If.>I ca|
|00004c80| 6c 6c 20 61 20 66 75 6e | 63 74 69 6f 6e 20 77 68 |ll a fun|ction wh|
|00004c90| 69 63 68 20 61 63 63 65 | 70 74 73 20 61 20 70 6f |ich acce|pts a po|
|00004ca0| 69 6e 74 65 72 20 74 6f | 20 42 61 73 65 2c 20 62 |inter to| Base, b|
|00004cb0| 75 74 20 74 68 65 20 70 | 6f 69 6e 74 65 72 20 69 |ut the p|ointer i|
|00004cc0| 73 0d 3e 6f 66 20 63 6c | 61 73 73 20 44 65 72 69 |s.>of cl|ass Deri|
|00004cd0| 76 65 64 2c 20 77 68 65 | 6e 20 74 68 65 20 66 75 |ved, whe|n the fu|
|00004ce0| 6e 63 74 69 6f 6e 20 64 | 65 6c 65 74 65 73 20 74 |nction d|eletes t|
|00004cf0| 68 65 20 6f 62 6a 65 63 | 74 2c 20 69 74 20 64 6f |he objec|t, it do|
|00004d00| 65 73 6e 27 74 0d 3e 63 | 61 6c 6c 20 44 65 72 69 |esn't.>c|all Deri|
|00004d10| 76 65 64 27 73 20 64 65 | 73 74 72 75 63 74 6f 72 |ved's de|structor|
|00004d20| 2e 20 49 66 20 49 20 61 | 64 64 20 61 20 64 65 73 |. If I a|dd a des|
|00004d30| 74 72 75 63 74 6f 72 20 | 74 6f 20 42 61 73 65 2c |tructor |to Base,|
|00004d40| 20 74 68 65 6e 20 69 74 | 0d 3e 63 61 6c 6c 73 20 | then it|.>calls |
|00004d50| 44 65 72 69 76 65 64 27 | 73 20 64 65 73 74 72 75 |Derived'|s destru|
|00004d60| 63 74 6f 72 2c 20 74 68 | 65 6e 20 42 61 73 65 27 |ctor, th|en Base'|
|00004d70| 73 20 64 65 73 74 72 75 | 63 74 6f 72 20 28 61 73 |s destru|ctor (as|
|00004d80| 20 49 20 77 6f 75 6c 64 | 20 65 78 70 65 63 74 29 | I would| expect)|
|00004d90| 2e 0d 3e 54 68 69 73 20 | 73 65 65 6d 73 20 6c 69 |..>This |seems li|
|00004da0| 6b 65 20 69 6e 63 6f 6e | 73 69 73 74 65 6e 74 20 |ke incon|sistent |
|00004db0| 62 65 68 61 76 69 6f 75 | 72 2e 20 49 73 20 74 68 |behaviou|r. Is th|
|00004dc0| 69 73 20 63 6f 72 72 65 | 63 74 20 43 2b 2b 3f 20 |is corre|ct C++? |
|00004dd0| 49 20 6e 65 65 64 20 74 | 6f 0d 3e 67 65 74 20 69 |I need t|o.>get i|
|00004de0| 74 20 74 6f 20 63 6f 72 | 72 65 63 74 6c 79 20 63 |t to cor|rectly c|
|00004df0| 61 6c 6c 20 44 65 72 69 | 76 65 64 27 73 20 64 65 |all Deri|ved's de|
|00004e00| 73 74 72 75 63 74 6f 72 | 2e 20 49 20 64 6f 6e 27 |structor|. I don'|
|00004e10| 74 20 77 61 6e 74 20 74 | 6f 20 68 61 76 65 20 74 |t want t|o have t|
|00004e20| 6f 0d 3e 61 64 64 20 61 | 20 64 65 73 74 72 75 63 |o.>add a| destruc|
|00004e30| 74 6f 72 20 74 6f 20 42 | 61 73 65 20 28 69 74 20 |tor to B|ase (it |
|00004e40| 64 6f 65 73 6e 74 20 6e | 65 65 64 20 6f 6e 65 29 |doesnt n|eed one)|
|00004e50| 2e 20 49 66 20 79 6f 75 | 72 20 72 65 73 70 6f 6e |. If you|r respon|
|00004e60| 73 65 20 69 73 0d 3e 22 | 6a 75 73 74 20 61 64 64 |se is.>"|just add|
|00004e70| 20 6f 6e 65 20 61 6e 79 | 77 61 79 22 2c 20 49 20 | one any|way", I |
|00004e80| 6d 75 73 74 20 70 6f 69 | 6e 74 20 74 68 69 73 20 |must poi|nt this |
|00004e90| 6f 75 74 3a 20 49 66 20 | 74 68 69 73 20 69 73 20 |out: If |this is |
|00004ea0| 61 20 62 75 67 2c 20 74 | 68 65 6e 0d 3e 6c 65 74 |a bug, t|hen.>let|
|00004eb0| 27 73 20 66 69 6e 64 20 | 6f 75 74 20 61 6c 6c 20 |'s find |out all |
|00004ec0| 74 68 65 20 72 61 6d 69 | 66 69 63 61 74 69 6f 6e |the rami|fication|
|00004ed0| 73 2c 20 69 6e 73 74 65 | 61 64 20 6f 66 20 6a 75 |s, inste|ad of ju|
|00004ee0| 73 74 20 69 67 6e 6f 72 | 69 6e 67 20 69 74 2e 0d |st ignor|ing it..|
|00004ef0| 3e 20 0d 5b 53 61 6d 70 | 6c 65 20 64 65 6c 65 74 |> .[Samp|le delet|
|00004f00| 65 64 5d 0d 41 53 20 66 | 61 72 20 61 73 20 49 20 |ed].AS f|ar as I |
|00004f10| 6b 6e 6f 77 2c 20 74 68 | 69 73 20 69 73 20 63 6f |know, th|is is co|
|00004f20| 72 72 65 63 74 20 43 2b | 2b 2e 20 42 61 73 65 20 |rrect C+|+. Base |
|00004f30| 68 61 73 20 6e 6f 20 64 | 74 6f 72 2c 20 74 68 65 |has no d|tor, the|
|00004f40| 72 65 66 6f 72 65 2c 20 | 77 68 65 6e 20 0d 79 6f |refore, |when .yo|
|00004f50| 75 20 64 65 6c 65 74 65 | 20 61 20 42 61 73 65 20 |u delete| a Base |
|00004f60| 2a 2c 20 74 68 65 72 65 | 20 69 73 20 6e 6f 20 64 |*, there| is no d|
|00004f70| 74 6f 72 20 74 6f 20 63 | 61 6c 6c 2e 20 54 68 65 |tor to c|all. The|
|00004f80| 72 65 66 6f 72 65 2c 20 | 79 6f 75 72 20 63 6f 6d |refore, |your com|
|00004f90| 70 69 6c 65 72 20 69 73 | 0d 64 6f 69 6e 67 20 74 |piler is|.doing t|
|00004fa0| 68 65 20 72 69 67 68 74 | 20 74 68 69 6e 67 2e 20 |he right| thing. |
|00004fb0| 41 64 64 20 61 20 76 69 | 72 74 75 61 6c 20 64 74 |Add a vi|rtual dt|
|00004fc0| 6f 72 20 74 6f 20 42 61 | 73 65 20 61 6e 79 77 61 |or to Ba|se anywa|
|00004fd0| 79 2e 20 54 68 69 73 20 | 77 69 6c 6c 20 63 61 75 |y. This |will cau|
|00004fe0| 73 65 20 74 68 65 0d 63 | 6f 72 72 65 63 74 20 74 |se the.c|orrect t|
|00004ff0| 68 69 6e 67 20 74 6f 20 | 68 61 70 70 65 6e 2e 20 |hing to |happen. |
|00005000| 28 46 72 6f 6d 20 79 6f | 75 72 20 70 65 72 73 70 |(From yo|ur persp|
|00005010| 65 63 74 69 76 65 2c 20 | 6d 65 61 6e 69 6e 67 20 |ective, |meaning |
|00005020| 44 65 72 69 76 65 64 20 | 64 74 6f 72 20 69 73 20 |Derived |dtor is |
|00005030| 0d 63 61 6c 6c 65 64 2e | 20 46 72 6f 6d 20 74 68 |.called.| From th|
|00005040| 65 20 43 2b 2b 20 70 65 | 72 73 70 65 63 74 69 76 |e C++ pe|rspectiv|
|00005050| 65 2c 20 74 68 65 20 63 | 6f 72 72 65 63 74 20 74 |e, the c|orrect t|
|00005060| 68 69 6e 67 20 69 73 20 | 61 6c 72 65 61 64 79 20 |hing is |already |
|00005070| 68 61 70 70 65 6e 69 6e | 67 2c 20 61 6e 64 0d 79 |happenin|g, and.y|
|00005080| 6f 75 20 68 61 76 65 20 | 61 20 62 75 67 20 69 6e |ou have |a bug in|
|00005090| 20 79 6f 75 72 20 63 6f | 64 65 2e 2e 2e 29 0d 20 | your co|de...). |
|000050a0| 0d 2d 20 2d 4a 69 6d 0d | 0d 0d 0d 2b 2b 2b 2b 2b |.- -Jim.|...+++++|
|000050b0| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|000050c0| 2b 2b 2b 2b 2b 2b 0d 0d | 3e 46 72 6f 6d 20 73 32 |++++++..|>From s2|
|000050d0| 33 36 31 39 30 35 40 74 | 65 63 68 73 74 30 32 2e |361905@t|echst02.|
|000050e0| 74 65 63 68 6e 69 6f 6e | 2e 61 63 2e 69 6c 20 28 |technion|.ac.il (|
|000050f0| 42 65 6e 20 48 65 6b 73 | 74 65 72 29 0d 44 61 74 |Ben Heks|ter).Dat|
|00005100| 65 3a 20 54 68 75 2c 20 | 32 38 20 4a 75 6c 20 31 |e: Thu, |28 Jul 1|
|00005110| 39 39 34 20 31 39 3a 33 | 37 3a 34 34 20 47 4d 54 |994 19:3|7:44 GMT|
|00005120| 0d 4f 72 67 61 6e 69 7a | 61 74 69 6f 6e 3a 20 54 |.Organiz|ation: T|
|00005130| 65 63 68 6e 69 6f 6e 2c | 20 49 73 72 61 65 6c 20 |echnion,| Israel |
|00005140| 49 6e 73 74 69 74 75 74 | 65 20 6f 66 20 54 65 63 |Institut|e of Tec|
|00005150| 68 6e 6f 6c 6f 67 79 0d | 0d 48 69 2d 2d 0d 0d 3e |hnology.|.Hi--..>|
|00005160| 49 66 0d 3e 49 20 63 61 | 6c 6c 20 61 20 66 75 6e |If.>I ca|ll a fun|
|00005170| 63 74 69 6f 6e 20 77 68 | 69 63 68 20 61 63 63 65 |ction wh|ich acce|
|00005180| 70 74 73 20 61 20 70 6f | 69 6e 74 65 72 20 74 6f |pts a po|inter to|
|00005190| 20 42 61 73 65 2c 20 62 | 75 74 20 74 68 65 20 70 | Base, b|ut the p|
|000051a0| 6f 69 6e 74 65 72 20 69 | 73 0d 3e 6f 66 20 63 6c |ointer i|s.>of cl|
|000051b0| 61 73 73 20 44 65 72 69 | 76 65 64 2c 20 77 68 65 |ass Deri|ved, whe|
|000051c0| 6e 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 64 |n the fu|nction d|
|000051d0| 65 6c 65 74 65 73 20 74 | 68 65 20 6f 62 6a 65 63 |eletes t|he objec|
|000051e0| 74 2c 20 69 74 20 64 6f | 65 73 6e 27 74 0d 3e 63 |t, it do|esn't.>c|
|000051f0| 61 6c 6c 20 44 65 72 69 | 76 65 64 27 73 20 64 65 |all Deri|ved's de|
|00005200| 73 74 72 75 63 74 6f 72 | 2e 20 49 66 20 49 20 61 |structor|. If I a|
|00005210| 64 64 20 61 20 64 65 73 | 74 72 75 63 74 6f 72 20 |dd a des|tructor |
|00005220| 74 6f 20 42 61 73 65 2c | 20 74 68 65 6e 20 69 74 |to Base,| then it|
|00005230| 0d 3e 63 61 6c 6c 73 20 | 44 65 72 69 76 65 64 27 |.>calls |Derived'|
|00005240| 73 20 64 65 73 74 72 75 | 63 74 6f 72 2c 20 74 68 |s destru|ctor, th|
|00005250| 65 6e 20 42 61 73 65 27 | 73 20 64 65 73 74 72 75 |en Base'|s destru|
|00005260| 63 74 6f 72 20 28 61 73 | 20 49 20 77 6f 75 6c 64 |ctor (as| I would|
|00005270| 20 65 78 70 65 63 74 29 | 2e 0d 3e 5b 2e 2e 2e 5d | expect)|..>[...]|
|00005280| 20 49 73 20 74 68 69 73 | 20 63 6f 72 72 65 63 74 | Is this| correct|
|00005290| 20 43 2b 2b 3f 0d 0d 59 | 65 73 2c 20 74 68 69 73 | C++?..Y|es, this|
|000052a0| 20 69 73 20 63 6f 72 72 | 65 63 74 20 43 2b 2b 2e | is corr|ect C++.|
|000052b0| 20 20 49 66 20 79 6f 75 | 20 65 78 70 65 63 74 20 | If you| expect |
|000052c0| 74 6f 20 62 65 20 61 62 | 6c 65 20 74 6f 20 63 61 |to be ab|le to ca|
|000052d0| 6c 6c 20 6d 65 6d 62 65 | 72 0d 66 75 6e 63 74 69 |ll membe|r.functi|
|000052e0| 6f 6e 73 20 74 68 61 74 | 20 79 6f 75 20 6f 76 65 |ons that| you ove|
|000052f0| 72 72 69 64 65 20 69 6e | 20 64 65 72 69 76 65 64 |rride in| derived|
|00005300| 20 63 6c 61 73 73 65 73 | 2c 20 79 6f 75 20 6d 75 | classes|, you mu|
|00005310| 73 74 20 64 65 63 6c 61 | 72 65 0d 74 68 65 20 6d |st decla|re.the m|
|00005320| 65 6d 62 65 72 20 66 75 | 6e 63 74 69 6f 6e 20 60 |ember fu|nction `|
|00005330| 76 69 72 74 75 61 6c 27 | 20 69 6e 20 74 68 65 20 |virtual'| in the |
|00005340| 62 61 73 65 20 74 79 70 | 65 2e 20 20 4e 6f 74 65 |base typ|e. Note|
|00005350| 20 74 68 61 74 20 74 68 | 69 73 0d 69 73 20 74 72 | that th|is.is tr|
|00005360| 75 65 20 66 6f 72 20 61 | 6e 79 20 6d 65 6d 62 65 |ue for a|ny membe|
|00005370| 72 20 66 75 6e 63 74 69 | 6f 6e 2c 20 6e 6f 74 20 |r functi|on, not |
|00005380| 6a 75 73 74 20 64 65 73 | 74 72 75 63 74 6f 72 73 |just des|tructors|
|00005390| 2e 20 20 49 2e 65 2e 2c | 20 69 66 20 79 6f 75 0d |. I.e.,| if you.|
|000053a0| 68 61 76 65 0d 0d 09 63 | 6c 61 73 73 20 42 61 73 |have...c|lass Bas|
|000053b0| 65 20 7b 20 76 6f 69 64 | 20 66 28 29 3b 20 7d 3b |e { void| f(); };|
|000053c0| 0d 0d 09 63 6c 61 73 73 | 20 44 65 72 69 76 65 64 |...class| Derived|
|000053d0| 20 3a 20 70 75 62 6c 69 | 63 20 42 61 73 65 20 7b | : publi|c Base {|
|000053e0| 20 76 69 72 74 75 61 6c | 20 76 6f 69 64 20 66 28 | virtual| void f(|
|000053f0| 29 3b 20 7d 3b 0d 0d 74 | 68 65 6e 20 61 6e 79 20 |); };..t|hen any |
|00005400| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 6f 66 20 66 |applicat|ion of f|
|00005410| 28 29 20 74 6f 20 61 20 | 42 61 73 65 20 62 69 6e |() to a |Base bin|
|00005420| 64 73 20 74 6f 20 42 61 | 73 65 3a 3a 66 28 29 2e |ds to Ba|se::f().|
|00005430| 20 20 49 66 20 79 6f 75 | 0d 77 61 6e 74 20 74 68 | If you|.want th|
|00005440| 65 20 62 69 6e 64 69 6e | 67 20 74 6f 20 62 65 20 |e bindin|g to be |
|00005450| 64 79 6e 61 6d 69 63 2c | 20 79 6f 75 20 6d 75 73 |dynamic,| you mus|
|00005460| 74 20 73 75 70 70 6c 79 | 20 74 68 65 20 60 76 69 |t supply| the `vi|
|00005470| 72 74 75 61 6c 27 2e 0d | 42 79 20 6f 6d 69 74 74 |rtual'..|By omitt|
|00005480| 69 6e 67 20 69 74 20 79 | 6f 75 20 61 72 65 20 69 |ing it y|ou are i|
|00005490| 6d 70 6c 79 69 6e 67 20 | 74 68 61 74 20 65 69 74 |mplying |that eit|
|000054a0| 68 65 72 20 79 6f 75 20 | 64 6f 20 6e 6f 74 20 65 |her you |do not e|
|000054b0| 78 70 65 63 74 20 74 68 | 69 73 0d 66 75 6e 63 74 |xpect th|is.funct|
|000054c0| 69 6f 6e 20 74 6f 20 62 | 65 20 6f 76 65 72 72 69 |ion to b|e overri|
|000054d0| 64 64 65 6e 2c 20 6f 72 | 20 74 68 61 74 20 79 6f |dden, or| that yo|
|000054e0| 75 20 64 6f 6e 27 74 20 | 77 61 6e 74 2f 6e 65 65 |u don't |want/nee|
|000054f0| 64 20 6f 76 65 72 72 69 | 64 64 65 6e 0d 76 65 72 |d overri|dden.ver|
|00005500| 73 69 6f 6e 73 20 74 6f | 20 62 65 20 63 61 6c 6c |sions to| be call|
|00005510| 65 64 2e 0d 0d 09 54 68 | 65 20 71 75 65 73 74 69 |ed....Th|e questi|
|00005520| 6f 6e 61 62 6c 65 20 74 | 68 69 6e 67 20 68 65 72 |onable t|hing her|
|00005530| 65 20 69 73 20 77 68 79 | 20 74 68 65 20 63 6f 6d |e is why| the com|
|00005540| 70 69 6c 65 72 20 64 6f | 65 73 6e 27 74 0d 77 61 |piler do|esn't.wa|
|00005550| 72 6e 20 61 62 6f 75 74 | 20 74 68 65 20 72 65 64 |rn about| the red|
|00005560| 65 63 6c 61 72 61 74 69 | 6f 6e 20 6f 66 20 66 28 |eclarati|on of f(|
|00005570| 29 2e 20 20 50 6f 73 73 | 69 62 6c 79 20 62 65 63 |). Poss|ibly bec|
|00005580| 61 75 73 65 20 6f 66 20 | 43 0d 63 6f 6d 70 61 74 |ause of |C.compat|
|00005590| 69 62 69 6c 69 74 79 20 | 72 65 61 73 6f 6e 73 2e |ibility |reasons.|
|000055a0| 20 20 4d 50 57 20 63 66 | 72 6f 6e 74 20 64 6f 65 | MPW cf|ront doe|
|000055b0| 73 6e 27 74 20 65 69 74 | 68 65 72 2c 20 65 76 65 |sn't eit|her, eve|
|000055c0| 6e 20 77 69 74 68 20 6d | 61 78 69 6d 75 6d 0d 77 |n with m|aximum.w|
|000055d0| 61 72 6e 69 6e 67 73 2e | 0d 0d 09 49 6e 20 67 65 |arnings.|...In ge|
|000055e0| 6e 65 72 61 6c 2c 20 69 | 66 20 79 6f 75 72 20 63 |neral, i|f your c|
|000055f0| 6c 61 73 73 20 68 61 73 | 20 76 69 72 74 75 61 6c |lass has| virtual|
|00005600| 20 6d 65 6d 62 65 72 73 | 2c 20 69 74 20 73 68 6f | members|, it sho|
|00005610| 75 6c 64 0d 68 61 76 65 | 20 61 20 76 69 72 74 75 |uld.have| a virtu|
|00005620| 61 6c 20 64 65 73 74 72 | 75 63 74 6f 72 2c 20 65 |al destr|uctor, e|
|00005630| 76 65 6e 20 69 66 20 74 | 68 65 20 64 65 73 74 72 |ven if t|he destr|
|00005640| 75 63 74 6f 72 20 61 63 | 74 69 6f 6e 20 69 74 73 |uctor ac|tion its|
|00005650| 65 6c 66 20 69 73 0d 74 | 72 69 76 69 61 6c 2e 20 |elf is.t|rivial. |
|00005660| 20 54 68 65 20 41 52 4d | 20 77 61 72 6e 73 20 61 | The ARM| warns a|
|00005670| 62 6f 75 74 20 74 68 69 | 73 2c 20 74 6f 20 61 76 |bout thi|s, to av|
|00005680| 6f 69 64 20 65 78 61 63 | 74 6c 79 20 74 68 65 20 |oid exac|tly the |
|00005690| 70 72 6f 62 6c 65 6d 0d | 79 6f 75 20 61 72 65 20 |problem.|you are |
|000056a0| 68 61 76 69 6e 67 20 6e | 6f 77 2e 0d 0d 42 65 6e |having n|ow...Ben|
|000056b0| 0d 0d 0d 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |...+++++|++++++++|
|000056c0| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 0d 0d |++++++++|++++++..|
|000056d0| 3e 46 72 6f 6d 20 61 66 | 63 6a 6c 6c 6f 79 64 40 |>From af|cjlloyd@|
|000056e0| 61 6f 6c 2e 63 6f 6d 20 | 28 41 46 43 20 4a 4c 6c |aol.com |(AFC JLl|
|000056f0| 6f 79 64 29 0d 44 61 74 | 65 3a 20 32 39 20 4a 75 |oyd).Dat|e: 29 Ju|
|00005700| 6c 20 31 39 39 34 20 30 | 32 3a 31 31 3a 30 37 20 |l 1994 0|2:11:07 |
|00005710| 2d 30 34 30 30 0d 4f 72 | 67 61 6e 69 7a 61 74 69 |-0400.Or|ganizati|
|00005720| 6f 6e 3a 20 41 6d 65 72 | 69 63 61 20 4f 6e 6c 69 |on: Amer|ica Onli|
|00005730| 6e 65 2c 20 49 6e 63 2e | 20 28 31 2d 38 30 30 2d |ne, Inc.| (1-800-|
|00005740| 38 32 37 2d 36 33 36 34 | 29 0d 0d 49 6e 20 61 72 |827-6364|)..In ar|
|00005750| 74 69 63 6c 65 20 3c 6e | 61 67 6c 65 43 74 6f 6f |ticle <n|agleCtoo|
|00005760| 75 34 2e 42 78 77 40 6e | 65 74 63 6f 6d 2e 63 6f |u4.Bxw@n|etcom.co|
|00005770| 6d 3e 2c 20 6e 61 67 6c | 65 40 6e 65 74 63 6f 6d |m>, nagl|e@netcom|
|00005780| 2e 63 6f 6d 20 28 4a 6f | 68 6e 20 4e 61 67 6c 65 |.com (Jo|hn Nagle|
|00005790| 29 0d 77 72 69 74 65 73 | 3a 0d 0d 3e 6e 65 65 72 |).writes|:..>neer|
|000057a0| 69 40 69 69 73 2e 65 65 | 2e 65 74 68 7a 2e 63 68 |i@iis.ee|.ethz.ch|
|000057b0| 20 28 4d 61 74 74 68 69 | 61 73 20 4e 65 65 72 61 | (Matthi|as Neera|
|000057c0| 63 68 65 72 29 20 77 72 | 69 74 65 73 3a 0d 3e 3e |cher) wr|ites:.>>|
|000057d0| 49 6e 20 61 72 74 69 63 | 6c 65 20 3c 39 71 39 34 |In artic|le <9q94|
|000057e0| 50 63 32 77 31 36 35 77 | 40 6b 75 6e 69 6b 70 6f |Pc2w165w|@kunikpo|
|000057f0| 6b 2e 69 63 75 73 2e 63 | 6f 6d 3e 20 61 6e 74 40 |k.icus.c|om> ant@|
|00005800| 6b 75 6e 69 6b 70 6f 6b | 2e 69 63 75 73 2e 63 6f |kunikpok|.icus.co|
|00005810| 6d 0d 28 68 61 6e 64 6c | 65 29 20 77 72 69 74 65 |m.(handl|e) write|
|00005820| 73 3a 0d 3e 3e 3e 20 49 | 27 6d 20 68 61 76 69 6e |s:.>>> I|'m havin|
|00005830| 67 20 61 20 70 72 6f 62 | 6c 65 6d 20 77 69 74 68 |g a prob|lem with|
|00005840| 20 64 65 73 74 72 75 63 | 74 6f 72 73 2e 20 49 74 | destruc|tors. It|
|00005850| 20 70 6f 70 70 65 64 20 | 75 70 20 69 6e 20 61 20 | popped |up in a |
|00005860| 66 61 69 72 6c 79 20 6c | 61 72 67 65 0d 3e 3e 3e |fairly l|arge.>>>|
|00005870| 20 68 69 65 72 61 72 63 | 68 79 2c 20 61 6e 64 20 | hierarc|hy, and |
|00005880| 49 27 76 65 20 62 6f 69 | 6c 65 64 20 69 74 20 64 |I've boi|led it d|
|00005890| 6f 77 6e 20 74 6f 20 74 | 68 65 20 73 69 6d 70 6c |own to t|he simpl|
|000058a0| 65 73 74 20 70 6f 73 73 | 69 62 6c 65 20 62 65 6c |est poss|ible bel|
|000058b0| 6f 77 2e 20 49 66 0d 3e | 3e 3e 20 49 20 63 61 6c |ow. If.>|>> I cal|
|000058c0| 6c 20 61 20 66 75 6e 63 | 74 69 6f 6e 20 77 68 69 |l a func|tion whi|
|000058d0| 63 68 20 61 63 63 65 70 | 74 73 20 61 20 70 6f 69 |ch accep|ts a poi|
|000058e0| 6e 74 65 72 20 74 6f 20 | 42 61 73 65 2c 20 62 75 |nter to |Base, bu|
|000058f0| 74 20 74 68 65 20 70 6f | 69 6e 74 65 72 20 69 73 |t the po|inter is|
|00005900| 0d 3e 3e 3e 20 6f 66 20 | 63 6c 61 73 73 20 44 65 |.>>> of |class De|
|00005910| 72 69 76 65 64 2c 20 77 | 68 65 6e 20 74 68 65 20 |rived, w|hen the |
|00005920| 66 75 6e 63 74 69 6f 6e | 20 64 65 6c 65 74 65 73 |function| deletes|
|00005930| 20 74 68 65 20 6f 62 6a | 65 63 74 2c 20 69 74 20 | the obj|ect, it |
|00005940| 64 6f 65 73 6e 27 74 0d | 3e 3e 3e 20 63 61 6c 6c |doesn't.|>>> call|
|00005950| 20 44 65 72 69 76 65 64 | 27 73 20 64 65 73 74 72 | Derived|'s destr|
|00005960| 75 63 74 6f 72 2e 20 49 | 66 20 49 20 61 64 64 20 |uctor. I|f I add |
|00005970| 61 20 64 65 73 74 72 75 | 63 74 6f 72 20 74 6f 20 |a destru|ctor to |
|00005980| 42 61 73 65 2c 20 74 68 | 65 6e 20 69 74 0d 3e 3e |Base, th|en it.>>|
|00005990| 3e 20 63 61 6c 6c 73 20 | 44 65 72 69 76 65 64 27 |> calls |Derived'|
|000059a0| 73 20 64 65 73 74 72 75 | 63 74 6f 72 2c 20 74 68 |s destru|ctor, th|
|000059b0| 65 6e 20 42 61 73 65 27 | 73 20 64 65 73 74 72 75 |en Base'|s destru|
|000059c0| 63 74 6f 72 20 28 61 73 | 20 49 20 77 6f 75 6c 64 |ctor (as| I would|
|000059d0| 0d 65 78 70 65 63 74 29 | 2e 0d 3e 3e 3e 20 54 68 |.expect)|..>>> Th|
|000059e0| 69 73 20 73 65 65 6d 73 | 20 6c 69 6b 65 20 69 6e |is seems| like in|
|000059f0| 63 6f 6e 73 69 73 74 65 | 6e 74 20 62 65 68 61 76 |consiste|nt behav|
|00005a00| 69 6f 75 72 2e 20 49 73 | 20 74 68 69 73 20 63 6f |iour. Is| this co|
|00005a10| 72 72 65 63 74 20 43 2b | 2b 3f 0d 3e 0d 3e 3e 59 |rrect C+|+?.>.>>Y|
|00005a20| 65 73 2e 0d 3e 0d 3e 20 | 20 20 20 20 54 68 61 74 |es..>.> | That|
|00005a30| 27 73 20 72 69 67 68 74 | 2c 20 62 75 74 20 74 68 |'s right|, but th|
|00005a40| 65 20 72 61 74 69 6f 6e | 61 6c 65 20 66 6f 72 20 |e ration|ale for |
|00005a50| 69 74 20 77 6f 72 6b 69 | 6e 67 20 74 68 69 73 20 |it worki|ng this |
|00005a60| 77 61 79 20 69 73 20 77 | 69 65 72 64 2e 0d 3e 0d |way is w|ierd..>.|
|00005a70| 3e 20 20 20 20 20 54 68 | 65 20 74 72 6f 75 62 6c |> Th|e troubl|
|00005a80| 65 20 63 6f 6d 65 73 20 | 66 72 6f 6d 20 74 68 65 |e comes |from the|
|00005a90| 20 43 2b 2b 20 64 65 73 | 69 67 6e 20 64 65 63 69 | C++ des|ign deci|
|00005aa0| 73 69 6f 6e 20 74 68 61 | 74 20 63 6c 61 73 73 65 |sion tha|t classe|
|00005ab0| 73 20 61 6e 64 0d 3e 73 | 74 72 75 63 74 73 20 61 |s and.>s|tructs a|
|00005ac0| 72 65 20 74 68 65 20 73 | 61 6d 65 2c 20 70 6c 75 |re the s|ame, plu|
|00005ad0| 73 20 74 68 65 20 64 65 | 73 69 67 6e 20 64 65 63 |s the de|sign dec|
|00005ae0| 69 73 69 6f 6e 20 74 68 | 61 74 20 63 6c 61 73 73 |ision th|at class|
|00005af0| 65 73 20 74 68 61 74 20 | 64 6f 6e 27 74 0d 3e 75 |es that |don't.>u|
|00005b00| 73 65 20 22 43 2b 2b 20 | 66 65 61 74 75 72 65 73 |se "C++ |features|
|00005b10| 22 20 68 61 76 65 20 63 | 6f 6d 70 61 74 69 62 6c |" have c|ompatibl|
|00005b20| 65 20 73 74 6f 72 61 67 | 65 20 6c 61 79 6f 75 74 |e storag|e layout|
|00005b30| 20 77 69 74 68 20 43 20 | 73 74 72 75 63 74 73 2e | with C |structs.|
|00005b40| 0d 3e 20 4c 6f 67 69 63 | 61 6c 6c 79 2c 20 61 6c |.> Logic|ally, al|
|00005b50| 6c 20 64 65 73 74 72 75 | 63 74 6f 72 73 20 73 68 |l destru|ctors sh|
|00005b60| 6f 75 6c 64 20 62 65 20 | 76 69 72 74 75 61 6c 2c |ould be |virtual,|
|00005b70| 20 62 75 74 20 74 68 61 | 74 20 77 6f 75 6c 64 20 | but tha|t would |
|00005b80| 66 6f 72 63 65 0d 3e 61 | 6c 6c 20 63 6c 61 73 73 |force.>a|ll class|
|00005b90| 65 73 20 74 6f 20 68 61 | 76 65 20 74 68 65 20 6d |es to ha|ve the m|
|00005ba0| 61 63 68 69 6e 65 72 79 | 20 66 6f 72 20 76 69 72 |achinery| for vir|
|00005bb0| 74 75 61 6c 20 66 75 6e | 63 74 69 6f 6e 73 2c 20 |tual fun|ctions, |
|00005bc0| 69 6e 20 63 61 73 65 20 | 73 6f 6d 65 62 6f 64 79 |in case |somebody|
|00005bd0| 0d 3e 6c 61 74 65 72 20 | 64 65 72 69 76 65 64 20 |.>later |derived |
|00005be0| 61 20 63 6c 61 73 73 20 | 66 72 6f 6d 20 74 68 61 |a class |from tha|
|00005bf0| 74 20 63 6c 61 73 73 2e | 20 20 54 68 69 73 20 77 |t class.| This w|
|00005c00| 6f 75 6c 64 20 62 72 65 | 61 6b 20 43 20 64 61 74 |ould bre|ak C dat|
|00005c10| 61 20 73 74 72 75 63 74 | 75 72 65 0d 3e 63 6f 6d |a struct|ure.>com|
|00005c20| 70 61 74 69 62 69 6c 69 | 74 79 2e 0d 3e 0d 3e 20 |patibili|ty..>.> |
|00005c30| 20 20 20 20 49 74 20 72 | 65 61 6c 6c 79 20 73 68 | It r|eally sh|
|00005c40| 6f 75 6c 64 20 62 65 20 | 61 6e 20 65 72 72 6f 72 |ould be |an error|
|00005c50| 20 74 6f 20 64 65 72 69 | 76 65 20 61 20 63 6c 61 | to deri|ve a cla|
|00005c60| 73 73 20 77 69 74 68 20 | 61 20 64 65 73 74 72 75 |ss with |a destru|
|00005c70| 63 74 6f 72 0d 3e 66 72 | 6f 6d 20 61 20 63 6c 61 |ctor.>fr|om a cla|
|00005c80| 73 73 20 77 68 69 63 68 | 20 64 6f 65 73 20 6e 6f |ss which| does no|
|00005c90| 74 20 68 61 76 65 20 61 | 20 76 69 72 74 75 61 6c |t have a| virtual|
|00005ca0| 20 64 65 73 74 72 75 63 | 74 6f 72 2e 20 20 49 66 | destruc|tor. If|
|00005cb0| 20 79 6f 75 20 77 61 6e | 74 0d 3e 6e 6f 72 6d 61 | you wan|t.>norma|
|00005cc0| 6c 20 64 65 73 74 72 75 | 63 74 6f 72 20 73 65 6d |l destru|ctor sem|
|00005cd0| 61 6e 74 69 63 73 2c 20 | 79 6f 75 20 68 61 76 65 |antics, |you have|
|00005ce0| 20 74 6f 20 68 61 76 65 | 20 76 69 72 74 75 61 6c | to have| virtual|
|00005cf0| 20 64 65 73 74 72 75 63 | 74 6f 72 73 20 61 6c 6c | destruc|tors all|
|00005d00| 20 74 68 65 0d 77 61 79 | 0d 3e 64 6f 77 6e 20 74 | the.way|.>down t|
|00005d10| 6f 20 74 68 65 20 62 61 | 73 65 20 63 6c 61 73 73 |o the ba|se class|
|00005d20| 2e 20 20 54 68 69 73 20 | 69 73 20 65 61 73 69 6c |. This |is easil|
|00005d30| 79 20 63 68 65 63 6b 61 | 62 6c 65 20 61 6e 64 20 |y checka|ble and |
|00005d40| 73 68 6f 75 6c 64 20 62 | 65 0d 3e 63 68 65 63 6b |should b|e.>check|
|00005d50| 65 64 2c 20 72 61 74 68 | 65 72 20 74 68 61 6e 20 |ed, rath|er than |
|00005d60| 62 65 69 6e 67 20 76 69 | 65 77 65 64 20 61 73 20 |being vi|ewed as |
|00005d70| 61 20 72 69 74 65 20 6f | 66 20 70 61 73 73 61 67 |a rite o|f passag|
|00005d80| 65 20 66 6f 72 20 43 2b | 2b 0d 70 72 6f 67 72 61 |e for C+|+.progra|
|00005d90| 6d 6d 65 72 73 2e 0d 0d | 49 20 74 68 69 6e 6b 20 |mmers...|I think |
|00005da0| 69 74 27 73 20 61 20 6c | 69 74 74 6c 65 20 6d 6f |it's a l|ittle mo|
|00005db0| 72 65 20 63 6f 6d 70 6c | 69 63 61 74 65 64 20 74 |re compl|icated t|
|00005dc0| 68 61 6e 20 74 68 69 73 | 2e 20 20 49 20 63 61 6e |han this|. I can|
|00005dd0| 20 74 68 69 6e 6b 20 6f | 66 20 6c 6f 74 73 20 6f | think o|f lots o|
|00005de0| 66 0d 75 73 65 73 20 66 | 6f 72 20 63 6c 61 73 73 |f.uses f|or class|
|00005df0| 65 73 20 74 68 61 74 20 | 64 6f 6e 27 74 20 6e 65 |es that |don't ne|
|00005e00| 65 64 20 61 6e 79 20 76 | 69 72 74 75 61 6c 20 66 |ed any v|irtual f|
|00005e10| 75 6e 63 74 69 6f 6e 73 | 2c 20 62 75 74 20 6e 65 |unctions|, but ne|
|00005e20| 65 64 0d 64 65 73 74 72 | 75 63 74 6f 72 73 20 28 |ed.destr|uctors (|
|00005e30| 65 2e 67 2e 20 72 65 73 | 6f 75 72 63 65 20 61 63 |e.g. res|ource ac|
|00005e40| 71 75 69 73 69 74 69 6f | 6e 20 63 6c 61 73 73 65 |quisitio|n classe|
|00005e50| 73 29 2e 20 20 54 68 65 | 72 65 20 69 73 20 6e 6f |s). The|re is no|
|00005e60| 20 70 6f 69 6e 74 20 69 | 6e 0d 6d 61 6b 69 6e 67 | point i|n.making|
|00005e70| 20 74 68 65 20 64 65 73 | 74 72 75 63 74 6f 72 20 | the des|tructor |
|00005e80| 62 65 20 76 69 72 74 75 | 61 6c 20 69 6e 20 73 75 |be virtu|al in su|
|00005e90| 63 68 20 61 20 63 61 73 | 65 2c 20 61 6e 64 20 64 |ch a cas|e, and d|
|00005ea0| 6f 69 6e 67 20 73 6f 20 | 67 65 6e 65 72 61 74 65 |oing so |generate|
|00005eb0| 73 20 61 0d 77 68 6f 6c | 65 20 76 74 62 6c 20 77 |s a.whol|e vtbl w|
|00005ec0| 68 65 6e 20 6e 6f 6e 65 | 20 69 73 20 6e 65 65 64 |hen none| is need|
|00005ed0| 65 64 2c 20 73 6f 20 74 | 68 65 20 6f 76 65 72 68 |ed, so t|he overh|
|00005ee0| 65 61 64 20 63 6f 73 74 | 20 69 73 20 61 63 74 75 |ead cost| is actu|
|00005ef0| 61 6c 6c 79 20 71 75 69 | 74 65 0d 68 69 67 68 20 |ally qui|te.high |
|00005f00| 28 6d 75 63 68 20 6d 6f | 72 65 20 73 6f 20 74 68 |(much mo|re so th|
|00005f10| 61 6e 20 61 64 64 69 6e | 67 20 6f 6e 65 20 65 6e |an addin|g one en|
|00005f20| 74 72 79 20 74 6f 20 61 | 6e 20 61 6c 72 65 61 64 |try to a|n alread|
|00005f30| 79 20 65 78 69 73 74 69 | 6e 67 20 76 74 62 6c 29 |y existi|ng vtbl)|
|00005f40| 2e 0d 0d 48 6f 77 65 76 | 65 72 2c 20 49 20 61 67 |...Howev|er, I ag|
|00005f50| 72 65 65 20 77 69 74 68 | 20 74 68 65 20 69 64 65 |ree with| the ide|
|00005f60| 61 20 74 68 61 74 20 69 | 74 20 73 68 6f 75 6c 64 |a that i|t should|
|00005f70| 20 62 65 20 61 6e 20 65 | 72 72 6f 72 20 74 6f 20 | be an e|rror to |
|00005f80| 64 65 72 69 76 65 20 66 | 72 6f 6d 0d 63 6c 61 73 |derive f|rom.clas|
|00005f90| 73 65 73 20 74 68 61 74 | 20 64 6f 6e 27 74 20 68 |ses that| don't h|
|00005fa0| 61 76 65 20 76 69 72 74 | 75 61 6c 20 64 65 73 74 |ave virt|ual dest|
|00005fb0| 72 75 63 74 6f 72 73 2e | 20 20 53 69 6e 63 65 20 |ructors.| Since |
|00005fc0| 74 68 65 20 63 6f 6d 70 | 69 6c 65 72 20 64 6f 65 |the comp|iler doe|
|00005fd0| 73 6e 27 74 0d 65 6e 66 | 6f 72 63 65 20 69 74 20 |sn't.enf|orce it |
|00005fe0| 28 77 68 61 74 20 61 20 | 67 72 65 61 74 20 6f 70 |(what a |great op|
|00005ff0| 74 69 6f 6e 61 6c 20 77 | 61 72 6e 69 6e 67 21 29 |tional w|arning!)|
|00006000| 2c 20 74 68 65 20 6f 6e | 6c 79 20 74 68 69 6e 67 |, the on|ly thing|
|00006010| 20 79 6f 75 20 63 61 6e | 20 64 6f 20 69 73 0d 61 | you can| do is.a|
|00006020| 64 64 20 69 74 20 74 6f | 20 79 6f 75 72 20 6c 69 |dd it to| your li|
|00006030| 73 74 20 6f 66 20 63 6f | 64 69 6e 67 20 67 75 69 |st of co|ding gui|
|00006040| 64 65 6c 69 6e 65 73 2e | 20 20 53 63 6f 74 74 20 |delines.| Scott |
|00006050| 4d 65 79 65 72 27 73 20 | 69 73 20 6e 6f 77 20 77 |Meyer's |is now w|
|00006060| 72 69 74 69 6e 67 20 61 | 0d 63 6f 6c 75 6d 6e 20 |riting a|.column |
|00006070| 66 6f 72 20 74 68 65 20 | 43 2b 2b 20 52 65 70 6f |for the |C++ Repo|
|00006080| 72 74 20 77 68 69 63 68 | 20 63 6f 6e 74 69 6e 75 |rt which| continu|
|00006090| 65 73 20 74 68 65 20 73 | 65 74 20 6f 66 20 67 75 |es the s|et of gu|
|000060a0| 69 64 65 6c 69 6e 65 73 | 20 68 65 0d 65 73 74 61 |idelines| he.esta|
|000060b0| 62 6c 69 73 68 65 64 20 | 69 6e 20 68 69 73 20 28 |blished |in his (|
|000060c0| 74 72 75 6c 79 20 65 78 | 63 65 6c 6c 65 6e 74 29 |truly ex|cellent)|
|000060d0| 20 62 6f 6f 6b 20 22 45 | 66 66 65 63 74 69 76 65 | book "E|ffective|
|000060e0| 20 43 2b 2b 3a 20 35 30 | 20 53 70 65 63 69 66 69 | C++: 50| Specifi|
|000060f0| 63 20 57 61 79 73 0d 74 | 6f 20 49 6d 70 72 6f 76 |c Ways.t|o Improv|
|00006100| 65 20 59 6f 75 72 20 50 | 72 6f 67 72 61 6d 73 20 |e Your P|rograms |
|00006110| 61 6e 64 20 44 65 73 69 | 67 6e 73 22 2e 20 20 48 |and Desi|gns". H|
|00006120| 69 73 20 6d 6f 73 74 20 | 72 65 63 65 6e 74 20 63 |is most |recent c|
|00006130| 6f 6c 75 6d 6e 20 70 72 | 65 73 65 6e 74 73 0d 74 |olumn pr|esents.t|
|00006140| 68 65 20 67 75 69 64 65 | 6c 69 6e 65 3a 20 22 41 |he guide|line: "A|
|00006150| 76 6f 69 64 20 68 61 76 | 69 6e 67 20 63 6f 6e 63 |void hav|ing conc|
|00006160| 72 65 74 65 20 63 6c 61 | 73 73 65 73 20 69 6e 68 |rete cla|sses inh|
|00006170| 65 72 69 74 20 66 72 6f | 6d 20 63 6f 6e 63 72 65 |erit fro|m concre|
|00006180| 74 65 0d 63 6c 61 73 73 | 65 73 22 2e 20 20 43 6f |te.class|es". Co|
|00006190| 75 70 6c 65 20 74 68 69 | 73 20 77 69 74 68 20 74 |uple thi|s with t|
|000061a0| 68 65 20 67 75 69 64 65 | 6c 69 6e 65 20 22 4d 61 |he guide|line "Ma|
|000061b0| 6b 65 20 64 65 73 74 72 | 75 63 74 6f 72 73 20 76 |ke destr|uctors v|
|000061c0| 69 72 74 75 61 6c 20 69 | 6e 0d 61 62 73 74 72 61 |irtual i|n.abstra|
|000061d0| 63 74 20 62 61 73 65 20 | 63 6c 61 73 73 65 73 22 |ct base |classes"|
|000061e0| 2c 20 61 6e 64 20 79 6f | 75 27 72 65 20 77 65 6c |, and yo|u're wel|
|000061f0| 6c 20 63 6f 76 65 72 65 | 64 2e 0d 0d 42 79 20 74 |l covere|d...By t|
|00006200| 68 65 20 77 61 79 2c 20 | 69 66 20 74 68 65 20 67 |he way, |if the g|
|00006210| 75 69 64 65 6c 69 6e 65 | 20 61 67 61 69 6e 73 74 |uideline| against|
|00006220| 20 64 65 72 69 76 69 6e | 67 20 66 72 6f 6d 20 63 | derivin|g from c|
|00006230| 6f 6e 63 72 65 74 65 20 | 63 6c 61 73 73 65 73 20 |oncrete |classes |
|00006240| 73 65 65 6d 73 0d 77 72 | 6f 6e 67 20 74 6f 20 79 |seems.wr|ong to y|
|00006250| 6f 75 2c 20 49 20 68 69 | 67 68 6c 79 20 72 65 63 |ou, I hi|ghly rec|
|00006260| 6f 6d 6d 65 6e 64 20 79 | 6f 75 20 72 65 61 64 20 |ommend y|ou read |
|00006270| 74 68 65 20 61 72 74 69 | 63 6c 65 20 28 4a 75 6c |the arti|cle (Jul|
|00006280| 79 2d 41 75 67 75 73 74 | 20 39 34 0d 69 73 73 75 |y-August| 94.issu|
|00006290| 65 20 6f 66 20 43 2b 2b | 20 52 65 70 6f 72 74 2c |e of C++| Report,|
|000062a0| 20 73 68 6f 75 6c 64 20 | 73 74 69 6c 6c 20 62 65 | should |still be|
|000062b0| 20 6f 6e 20 74 68 65 20 | 6e 65 77 73 74 61 6e 64 | on the |newstand|
|000062c0| 73 29 2e 0d 0d 4a 69 6d | 20 4c 6c 6f 79 64 0d 61 |s)...Jim| Lloyd.a|
|000062d0| 66 63 6a 6c 6c 6f 79 64 | 40 61 6f 6c 2e 63 6f 6d |fcjlloyd|@aol.com|
|000062e0| 0d 20 0d 0d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |. ..----|--------|
|000062f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0d |--------|-------.|
|00006300| 0d 3e 46 72 6f 6d 20 65 | 61 6a 6f 68 6e 73 6e 40 |.>From e|ajohnsn@|
|00006310| 62 6c 75 65 2e 77 65 65 | 67 2e 75 69 6f 77 61 2e |blue.wee|g.uiowa.|
|00006320| 65 64 75 20 28 45 72 69 | 63 20 4a 6f 68 6e 73 6f |edu (Eri|c Johnso|
|00006330| 6e 29 0d 53 75 62 6a 65 | 63 74 3a 20 49 63 6f 6e |n).Subje|ct: Icon|
|00006340| 20 70 6f 73 69 74 69 6f | 6e 73 20 6f 6e 20 64 65 | positio|ns on de|
|00006350| 73 6b 74 6f 70 0d 44 61 | 74 65 3a 20 32 35 20 4a |sktop.Da|te: 25 J|
|00006360| 75 6c 20 31 39 39 34 20 | 31 38 3a 31 32 3a 33 33 |ul 1994 |18:12:33|
|00006370| 20 2d 30 35 30 30 0d 4f | 72 67 61 6e 69 7a 61 74 | -0500.O|rganizat|
|00006380| 69 6f 6e 3a 20 55 6e 69 | 76 65 72 73 69 74 79 20 |ion: Uni|versity |
|00006390| 6f 66 20 49 6f 77 61 2c | 20 49 6f 77 61 20 43 69 |of Iowa,| Iowa Ci|
|000063a0| 74 79 2c 20 49 41 2c 20 | 55 53 41 0d 0d 48 6f 70 |ty, IA, |USA..Hop|
|000063b0| 65 20 74 68 69 73 20 69 | 73 6e 27 74 20 74 6f 6f |e this i|sn't too|
|000063c0| 20 6f 62 76 69 6f 75 73 | 2c 20 62 75 74 20 49 20 | obvious|, but I |
|000063d0| 6c 61 63 6b 20 6d 6f 73 | 74 20 72 65 66 65 72 65 |lack mos|t refere|
|000063e0| 6e 63 65 20 73 6f 75 72 | 63 65 73 2e 20 20 49 20 |nce sour|ces. I |
|000063f0| 61 6d 20 0d 63 75 72 69 | 6f 75 73 20 68 6f 77 20 |am .curi|ous how |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.